我在这里遇到了麻烦。我无法输入文本来填充webdriver中modalDialog的空白。
我一直在尝试这样:
WebDriverWait block = new WebDriverWait(driver,10);
WebElement modal = block.until(ExpectedConditions.visibilityOfElementLocated(By.id("tambahbarang")));
WebElement input;
input = modal.findElement(By.id("nama"));
input.sendKeys("Kursi Kayu Jati");
input = modal.findElement(By.id("jenis"));
input.sendKeys("Furniture");
input = modal.findElement(By.id("suplier"));
input.sendKeys("CV Golden Wings");
input = modal.findElement(By.id("modal"));
input.sendKeys("350000");
input = modal.findElement(By.id("harga"));
input.sendKeys("500000");
input = modal.findElement(By.id("jumlah"));
input.sendKeys("2");
input = driver.findElement(By.id("submit"));
input.click();
Thread.sleep(10000);
driver.quit();
但仍然无法正常工作..请你能帮我吗?谢谢