microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.71k stars 3.58k forks source link

Does playwright support waiting for the element invisible? #5822

Closed SansLang closed 3 years ago

SansLang commented 3 years ago

For example, the same as selenium, WebDriverWait(driver, timeout).until_not(EC.visibility_of_element_located((By.XPATH, locator)))

pavelfeldman commented 3 years ago

Sure, see https://playwright.dev/docs/api/class-page/#pagewaitforselectorselector-options. Pass hidden or detached state into it.

SansLang commented 3 years ago

okay

yb172 commented 2 years ago

Looks like this has been updated to https://playwright.dev/docs/api/class-locator#locator-wait-for

TomasHubelbauer commented 1 year ago

Also https://playwright.dev/docs/api/class-page/#page-wait-for-selector-option-selector