I'm trying to upload a file within the windows pop up after clicking on a button:
After clicking on that button a pop up in shown:
I click on that button by using this:
driver.findElement(By.xpath("//*[@id=\"div-add-file\"]/a")).click();
Then, i used this:
driver.switchTo().activeElement().sendKeys("C:\\Users\\Steve\\Downloads\\01004185FCA003900517097.pdf");
It did not work.
I tried to do something like that avoiding clicking on the button but sending the file path:
driver.findElement(By.xpath("//*[@id=\"div-add-file\"]/a")).sendKeys("C:\\Users\\Maxi\\Downloads\\01004185FCA003900517097.pdf");
but it wont work.
Am i doing anything wrong?