Upload files using selenium

后端 未结 3 1052
被撕碎了的回忆
被撕碎了的回忆 2020-12-06 16:01

How to upload files from local via window prompt using selenium webdriver?

I want to perform the following actions:

  1. click on \'Browse\
3条回答
  •  春和景丽
    2020-12-06 16:14

    Have you tried using input() on proper file input control?

    WebElement fileInput = driver.findElement(By.id("some id"));
    fileInput.sendKeys("C:/path/to/file.extension");
    

提交回复
热议问题