【发布时间】:2020-03-11 13:39:55
【问题描述】:
我需要勾选添加 GPU 复选框。网站https://cloud.google.com/products/calculator 有代码
WebElement checkAddGRU = new WebDriverWait(driver, 20)
.until(ExpectedConditions.
presenceOfElementLocated(By.xpath("//md-input-container/md-checkbox/div[contains(text(),'Add GPUs')]")));
WebElement numberOfGPU = new WebDriverWait(driver, 10)
.until(ExpectedConditions.elementToBeClickable(By.xpath("//md-select[@placeholder='Number of GPUs']")));
while (!numberOfGPU.isDisplayed()) {
checkAddGRU.click();
}
但它不起作用。复选框最少为空。
【问题讨论】:
标签: java selenium testing selenium-webdriver automated-tests