SyntaxFix
Write A Post
Hire A Developer
Questions
The below one had worked for me
webDriver.findElement(By.xpath("//input[@type='file' and @name='importFile']")).sendKeys("C:/path/to/file.jpg");