Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
881 views
by
edited by
HI Guys ,

I am using robot class for upload a file in selenium . the same script i am running in browser stack . the script is not running in browser stack , could you please help me to resolve the issue .

1 Answer

0 like 0 dislike
by The go-to Tester (142 points)

I assume that your application is not using default upload input tag. So, you can not use sendKeys to fill in the file.

If your application uses default upload input tag, that looks something like below,

you can use driver.sendKeys("Your/path/to/file");

It will take care of sending a file to the server and upload the file to the application.

But, if your application uses customized file upload functionality, implementing this is really difficult. As, browserstack or any third party as far as I know do not allow any file to be uploaded to their server.

Hope that answers your question.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...