In Playwright (Python) when there are multiple buttons on a page, all with the same name, how do i select correct button?

Viewed 21

If I am implementing string locators, such as:

continue_button: str = "button:has-text(\"Continue\")"

If there are multiple buttons on the same page that say continue, but are for different paths, how do I select the correct continue... is there a way to add an index to that string locator?

0 Answers
Related