You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Appearance.Of creates a problem supporting playwright. Appearance.Of asks for a single element (driver.FindElement), but in selenium this apparently is really "find any". This violates strict mode which is a compelling feature of Playwright that if you ask for 1 element and in fact there are more than one element that matches, it throws an exception.
Alternatives
I think Appearance.Of could be changed to a count > 0 without breaking existing code, but hyrum's law suggests otherwise. Maybe a new Question needs to be posed.
The playwright driver could be forced to turn off strict mode, but this disables a useful feature.
We haven't yet made any progress on a Playwright package (unfortunately), but our initial thoughts for it were twofold:
We would create a light, "native" package that provides a Playwright Ability but not much more. Folks would focus on making custom Tasks and Questions since Playwright's methods already have built-in waiting.
For folks who would want to easily port tests from Selenium to Playwright, we would implement another package that would essentially be a Playwright adapter for the WebDriver Interactions. If any of those Interactions don't work or make sense for Playwright, then we could potentially exclude them or make them throw an exception. (Design TBD)
Description
Appearance.Of creates a problem supporting playwright. Appearance.Of asks for a single element (driver.FindElement), but in selenium this apparently is really "find any". This violates strict mode which is a compelling feature of Playwright that if you ask for 1 element and in fact there are more than one element that matches, it throws an exception.
Alternatives
I think Appearance.Of could be changed to a count > 0 without breaking existing code, but hyrum's law suggests otherwise. Maybe a new Question needs to be posed.
The playwright driver could be forced to turn off strict mode, but this disables a useful feature.
Anything else?
No response
Commitments
The text was updated successfully, but these errors were encountered: