0

https://saucelabs.com/resources/selenium-file-upload

I am trying to follow the above sample, but I would like to pass the input image file from a HTTP server instead of the local disk. How should I do it? I tried with the HTTP url but it doesn't seem to work as an argument.

1 Answer 1

0

You can't directly pass a file that is not on your local drive.

but you can do it in 2 steps:

1 - download the file. ex with http://commons.apache.org/proper/commons-io/:

FileUtils.copyURLToFile(aRemoteUrl, aLocalFile)

2 - upload the local file (as explained in your link)

(you can eventually delete the local file after that)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.