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,570 points
33 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,420 points

Related Questions In Selenium

0 votes
3 answers

Trying to upload files using Selenium(C#)

You can try using Javascript Executor to ...READ MORE

answered Aug 23 in Selenium by Abha
• 27,180 points
1,377 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,110 points
1,075 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,110 points
2,290 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,510 points
1,145 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,110 points
976 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
1,131 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
873 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,420 points
271 views
0 votes
1 answer