I have a web app that has a pendo guide injected into it. I unfortunately cannot turn these off so I have to handle them as they appear.
Is there a way to just create something that sits and waits for an element then only clicks it if it appears? In my case the element may or may not appear
This thread is trying to answer question ""
You could do it a number of ways.
You can use the
or() method of a locator:
Or you can use
await expect(pendoLocator).toBeVisible() in a try ... catch to catch the exception and continue if it doesn't appear
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email firstname.lastname@example.org.