I quite didn't get it from documentation how can I navigate upwards multiple time given that I have found the Locator by text.
For instance I do this and find the necessary Locator
page.getByText("Dropdown element with unique text on the webpage")
now I want to navigate upwards through parent elements a few times to get to the dropdown element, which can't be identifiable otherwise on the webpage.
This thread is trying to answer question "How can I navigate upwards multiple times through parent elements using a Locator in Playwright?"
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 email@example.com.