how to upload a file in selenium java
driver.findElement(By.id("urid")).sendKeys("drive:\\path\\filename.extension");
how to upload a file in selenium java
driver.findElement(By.id("urid")).sendKeys("drive:\\path\\filename.extension");
how to upload in selenium
In order to upload file using selenium we need to locate the upload button
in the DOM html. Then we do sendKeys by passing the path to the file.
First, I locate the element which takes the path of the file(Choose file button) :
WebElement input = driver.findElement(“id”);
And then I provide the path to the file using the sendKeys method :
input.sendKeys(“/path/to/file” + Keys.ENTER);
how to upload a file in selenium java
driver.findElement(By.id("urid")).sendKeys("drive:\\path\\filename.extension");
how to upload in selenium
In order to upload file using selenium we need to locate the upload button
in the DOM html. Then we do sendKeys by passing the path to the file.
First, I locate the element which takes the path of the file(Choose file button) :
WebElement input = driver.findElement(“id”);
And then I provide the path to the file using the sendKeys method :
input.sendKeys(“/path/to/file” + Keys.ENTER);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us