简体   繁体   中英

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 :

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

An expectation for checking that an element is either invisible or not present on the DOM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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