syby 0 Posted January 16, 2018 Report Share Posted January 16, 2018 apologize for my bad english. I'm using the google translator, and I hope it translates right.I'm trying to automate several classified pages, but I'm running into most of them with a problem uploading photos.is that you do not see the buttons or I do not know. At the time of writing the script, I take it step by step through the photo path.but when it comes to doing it automatically does not upload a photo.The problem page is:http://www.eroticosbcn.com/clasificados.php?view=postand the codic:add list to list (% pathPhotos1, $ get files (# rFotos1, "Yes"), "Delete", "Global")change file field ($ element offset (<name = "pic []">, 0), $ random list item (% pathPhotos1))wait (1)clear list (% pathFoto2)add list to list (% pathFoto2, $ get files (# eFotos2, "Yes"), "Delete", "Global")change file field ($ element offset (<name = "pic []">, 1), $ random list item (% path2)wait (1)Is there another way to do it or is the code that did it wrong? Quote Link to post Share on other sites
nubot 1 Posted January 22, 2018 Report Share Posted January 22, 2018 What browser are you using? Seems to work fine in 49 but not 21. Quote Link to post Share on other sites
syby 0 Posted January 22, 2018 Author Report Share Posted January 22, 2018 n Crome 49 the 21 does not work. proble make it in 21 but nothing Quote Link to post Share on other sites
syby 0 Posted January 22, 2018 Author Report Share Posted January 22, 2018 loop(10) { loop(1) { clear cookies navigate("http://www.eroticosbcn.com/clasificados.php?view=post","Wait") click(<class="agree">,"Left Click","No") wait(5) set(#var,$scrape attribute($element offset(<name="pic[]">,0),"name"),"Local") clear list(%foto1) add list to list(%foto1,$get files("C:\\Users\\SYBY\\Desktop\\1anuncio\\fotos3","Yes"),"Delete","Global") change file field($element offset(<name="pic[]">,0),$random list item(%foto1)) wait(1) loop(1) { wait(1) set(#var1,$scrape attribute($element offset(<name="pic[]">,1),"name"),"Local") clear list(%foto2) add list to list(%foto2,$get files("C:\\Users\\SYBY\\Desktop\\1anuncio\\foto2","Yes"),"Delete","Global") change file field($element offset(<name="pic[]">,1),$random list item(%foto2)) } wait(1) loop(1) { wait(1) set(#var3,$scrape attribute($element offset(<name="pic[]">,2),"name"),"Local") clear list(%foto3) add list to list(%foto3,$get files("C:\\Users\\SYBY\\Desktop\\1anuncio\\foto1","Yes"),"Delete","Global") change file field($element offset(<name="pic[]">,2),$random list item(%foto3)) } }} Quote Link to post Share on other sites
syby 0 Posted January 22, 2018 Author Report Share Posted January 22, 2018 Who knows how to make the code better? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.