Created
August 20, 2020 10:13
-
-
Save angelovstanton/5003c0bcff2182e24a353b53d66835eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void fileUpload() throws IOException { | |
driver.navigate().to( | |
"https://demos.telerik.com/aspnet-ajax/ajaxpanel/application-scenarios/file-upload/defaultcs.aspx"); | |
var element = driver.findElement(By.id("ctl00_ContentPlaceholder1_RadUpload1file0")); | |
String filePath = Paths.get(getProperty("java.io.tmpdir"), "debugWebDriver.xml").toString(); | |
File destFile = new File(filePath); | |
destFile.createNewFile(); | |
element.sendKeys(filePath); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment