Ser*_*Kim 1 webdriver selenium-webdriver
我有一个动态更改其文本的字段.我需要一种等待文本更改的方法.我不知道会出现什么文字,但我知道目前有哪些文字.所以我想等待它消失在元素中.有办法吗?
你可以尝试ExpectedConditions 函数textToBePresentInElement
并添加一个not
,比如,
WebDriverWait wait = new WebDriverWait(driver, 30);
WebElement element = driver.findElement(By.id("foo"));
wait.until(ExpectedConditions.not(
ExpectedConditions.textToBePresentInElement(element,"textToBePresent")));
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3467 次 |
最近记录: |