Open
Description
🚀 Feature Request
Many a times I find on the web application I test, the locators change. For e.g., if my code currently has
get_by_role("textbox", name="Name")
the page in somecases based on the data available changes it to:
get_by_label("Name)
The underlying page structure becomes different for the same field based on the data or other elements present. This makes the code fail.
Is it possible that playwright dynamically identifies which is the best locator to use based on the page structure? Is there any other way to implement these kinda of changes currently?
Example
No response
Motivation
I often face the issue of the underlying page structure changing although in the visible UI there's no difference. This results in frequent failures of the playwright code.