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
16 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
548 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,030 points
456 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,030 points
1,203 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,250 points
581 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,030 points
56 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
420 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
43 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
60 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.