I am using Selenium WebDriver and Java and I need to automate the file upload feature. I tried a lot, but the moment the Browse button is clicked and a new window opens the
Click on the button and use the below code. Notice the use of '\\' instead of '\' in the path name,it is important for the code to work..
WebElement file_input = driver.findElement(By.id("id_of_button")); file_input.sendKeys("C:\\Selenium\\ImageUpload_FF.exe");