Reputation: 6279
I want to upload a file from remote url in ruby using selenium
My tools:-
watir-webdriver
selenium-webdriver
Upload a file:-
browser.file_field(:id, 'file').set("https://www.google.co.in/logos/doodles/2015/holi-festival-2015-5124794139803648-hp.gif")
Error:-
Errno::ENOENT: No such file or directory - https://www.google.co.in/logos/doodles/2015/holi-festival-2015-5124794139803648-hp.gif
Upvotes: 1
Views: 632
Reputation: 473863
The value of an upload input field should be an absolute path to the file on your local machine, not a URL. Download the image first.
Upvotes: 3