简体   繁体   English

Jmeter - WebDriver采样器

[英]Jmeter - WebDriver Sampler

I need to wait for an element to disappear from the screen. 我需要等待一个元素从屏幕上消失。 I know how to wait for an element to be visible, I used the code below: 我知道如何等待元素可见,我使用下面的代码:

wait.until(conditions.presenceOfElementLocated(pkg.By.xpath("mainLoadingDialog")))

Now I just need to do the opposite and wait until the element is not visible anymore. 现在我只需要做相反的操作并等到元素不再可见。

Use ExpectedConditions.invisibilityOfElementLocated : 使用ExpectedConditions.invisibilityOfElementLocated

 until(ExpectedConditions.invisibilityOfElementLocated(pkg.By.xpath("mainLoadingDialog")));

An expectation for checking that an element is either invisible or not present on the DOM. 期望检查元素是否在DOM上不可见或不存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM