单击提交后清除最后一个文本字段的位置,这仍然是 WebDriver 中的错误吗?任何解决方法?我需要做的大多数测试都涉及填写和提交表格,所以如果这是一个问题,我可能需要回到 RC ......或者任何人都有一个类似于 selenium 的免费测试工具,并且应该是可靠的?
//Enter class harvested
//text fields
WebElement blankyear1 = driver.findElement(By.id("combobox0-text"));
WebElement blankyear2 = driver.findElement(By.id("combobox1-text"));
WebElement blankyear3 = driver.findElement(By.id("combobox2-text"));
blankyear3.sendKeys("Barley");
blankyear1.sendKeys("Wheat");
WebDriverWait wait = new WebDriverWait(driver, 5);
wait.until(ExpectedConditions.elementToBeClickable(By.id("combobox2-text")));
Thread.sleep(3000);
//last text field that gets cleared out before or after submit? (not sure)
blankyear2.sendKeys("Wheat");
Thread.sleep(3000);
//Submit application
driver.findElement(By.name("preSubmitApplication")).click();
Thread.sleep(3000);
谢谢大家。