Mrcrix 10 Posted November 5, 2016 Report Share Posted November 5, 2016 Hello, I'm looking for suggestions on how to upload some pictures in this website, I add the script to get directly to the point where to upload the image. I tried using "change file field" but it has no effect at all, trying to click on the button it makes the file selector to open but at that point I don't have any way to interact and chose the image file too upload. Thank you in advance to everyone who will spend some time on it! navigate("http://www.clickcase.it/annuncio","Wait") wait(2) wait for element(<name="ctl00$ContentPlaceHolder1$cmbContratto">,"","Appear") change dropdown(<name="ctl00$ContentPlaceHolder1$cmbContratto">,"Vendita") change dropdown(<name="ctl00$ContentPlaceHolder1$cmbCategoria">,"Residenziale") type text(<name="ctl00$ContentPlaceHolder1$txtComune">,"Roma","Standard") type text(<name="ctl00$ContentPlaceHolder1$txtComune">,"\{ENTER\}","Standard") change dropdown(<name="ctl00$ContentPlaceHolder1$cmbCategoria">,"Residenziale") wait for element(<name="ctl00$ContentPlaceHolder1$cmbTipologia">,"","Appear") change dropdown(<name="ctl00$ContentPlaceHolder1$cmbTipologia">,"Appartamento") type text(<name="ctl00$ContentPlaceHolder1$txtIndirizzo">,"Corso Vittorio Emanuele II","Standard") type text(<name="ctl00$ContentPlaceHolder1$txtCivico">,25,"Standard") click(<innertext="Trova indirizzo sulla mappa">,"Left Click","No") change file field(<name="ctl00$ContentPlaceHolder1$fileUpload">,"D:\\Myfolder\\Myimage.png") Quote Link to post Share on other sites
Varo 28 Posted November 6, 2016 Report Share Posted November 6, 2016 use this code: change file field(<id="fileUpload">,"C:\\sunnyday.jpg") Quote Link to post Share on other sites
Mrcrix 10 Posted November 6, 2016 Author Report Share Posted November 6, 2016 Hi Varo, did it work for you?I tried but it doesn't work, it's the same way I tried (see the last line) just using "id" instead of "name" but it's not working... on my side even the demo script for "change file field" is not working navigate("http://cgi-lib.berkeley.edu/ex/fup.html","Wait") change file field(<name="upfile">,"D:\\MyFOLDER\\MyFile.png") Quote Link to post Share on other sites
pash 504 Posted November 6, 2016 Report Share Posted November 6, 2016 Hi Varo, did it work for you?I tried but it doesn't work, it's the same way I tried (see the last line) just using "id" instead of "name" but it's not working... like "Varo" code it working.i test on ubot 5.9.37 & chrome 49 Quote Link to post Share on other sites
Mrcrix 10 Posted November 6, 2016 Author Report Share Posted November 6, 2016 I've just made the update and now it is working! Thank you!! 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.