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