Cypress automatically reloads the page after each test, making it easy to review test results quickly. Consider the following example: Playwright will be re-testing the element with the test id of status until the fetched element has the "Submitted" text. I want to check if a modal is visible on screen so I can close it. Thanks for contributing an answer to Stack Overflow! Sign up for a free GitHub account to open an issue and contact its maintainers and the community. This method returns a boolean value, indicating whether the element exists. should (not. Modify the same but use any non-disturbing function along with timeout.Below one checks whether the element is visible or not within 100 ms but the element raises an exception just after 100ms, so this is a workaround. In the above script instead of await page.$eval("#blue", e=>e.click()) if you give console.log(await page.$eval("#blue", e=>e.textContent)) you can get the text of the element.Example program : To find more than one element "$$" is used. Check element exists There is no direct way to see whether an element exists or not in the playwright. Thank you again~. Perhaps I was wrong, and Playwright always waits for the full page to load, before trying to access elements with query_selector? Give feedback. Element is considered enabled unless it is a