1
我正在嘗試使用Java上傳Selenium網絡驅動程序的文件。selenium webdriver上傳文件
driver = new FirefoxDriver();
driver.get("http://favicon-generator.org/");
driver.manage().window().maximize();
wait.until(ExpectedConditions.elementToBeClickable(By.id("favicon")));
WebElement el = driver.findElement(By.id("favicon"));
el.sendKeys("test.jpg");
我運行後,輸入字段沒有填充。
當您單擊創建Favicon按鈕時,它會顯示「您沒有選擇要上傳的圖片,請重試。」 ? – 2014-09-23 13:08:14
是的。 「您沒有選擇要上傳的圖片,請重試。」 – 2014-09-23 13:16:59
提供完整系統路徑的圖片 – 2014-09-23 13:19:44