Problem or motivation
Though different locator APIs are available like getByText(), getByRole(), getByTestId(), getByLabel(), I think there should be support for finding elements using xpath, id and classname.
I understand finding elements with these locators in not recommended but I think it will still work as a fallback strategy when no other strategies are useful.
Proposed solution
We should be able to retrieve element using getByLocator() API
e.g
getByLocator("//xapth-of-element")
getByLocator("#id-of-element")
getByLocator(".className-of-element")
Target platform
Both
Alternatives considered
No response
Additional context
No response
Problem or motivation
Though different locator APIs are available like
getByText(),getByRole(),getByTestId(),getByLabel(), I think there should be support for finding elements using xpath, id and classname.I understand finding elements with these locators in not recommended but I think it will still work as a fallback strategy when no other strategies are useful.
Proposed solution
We should be able to retrieve element using
getByLocator()APIe.g
Target platform
Both
Alternatives considered
No response
Additional context
No response