in Selenium by
How to Upload a file in Selenium WebDriver?

▼ Show 2 Answers

0 votes

There are two cases which are majorly used to upload a file in Selenium WebDriver such as using SendKeys Method and using AutoIT Script.

0 votes
You can achieve this by using sendkeys() or Robot class method. Locate the text box and set the file path using sendkeys() and click on submit button

Locate the browse button

   WebElement browse =driver.findElement("uploadfile"));

Pass the path of the file to be uploaded using sendKeys method

Learn More with Madanswer

Related questions

0 votes
asked Aug 22, 2019 in Selenium by john ganales