Uploading files using selenium WebDriver

0 votes

 I want to perform the following actions using Selenium WebDriver

  1. Click on 'Browse' option in the window
  2. Go to the particular location in the local where the file is kept
  3. Select the file and click on 'Open' to upload the file
Jul 5, 2018 in Selenium by 93.lynn
• 1,550 points
20 views

1 answer to this question.

0 votes

Try using input() function:

WebElement fileInput = driver.findElement(By.id("id"));
fileInput.sendKeys("D:/path/file.extension");
answered Jul 5, 2018 by Meci Matt
• 9,400 points

Related Questions In Selenium

0 votes
2 answers

Trying to upload files using Selenium(C#)

For uploading file using C# we use ...READ MORE

answered Feb 1 in Selenium by anonymous
767 views
0 votes
1 answer

I tried to open a new website when a new tab is opened using Selenium Webdriver

Try this code: ArrayList<String> tabs = new ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,050 points
697 views
0 votes
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,050 points
1,620 views
0 votes
1 answer

Double click a record in a grid using Selenium webdriver

Try Actions class to perform this Actions action ...READ MORE

answered Mar 29, 2018 in Selenium by Damon Salvatore
• 5,490 points
799 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,050 points
262 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
629 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
258 views
0 votes
1 answer

Uploading File using Selenium WebDriver

Make sure that the input element is visible ...READ MORE

answered May 2, 2018 in Selenium by Meci Matt
• 9,400 points
99 views
0 votes
1 answer