w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
679 stars 194 forks source link

Custom Locator Strategies #1649

Closed titusfortner closed 2 years ago

titusfortner commented 2 years ago

Ideally, an Appium server should be able to register with a Selenium grid and everything should just work.

The issue we're facing is that Appium has several locator strategies that are unique to mobile applications ("accessibility id", "android datamatcher", etc)

The Selenium grid is properly raising an error since those locators are not on the approved list

If location strategy is not present as a keyword in the table of location strategies, return error with error code invalid argument.

Is there a reason we have to be restrictive about this, or can we specify the ones that all implementations should implement, but let the endpoint node determine if it recognizes the one provided or not?

Like, the actual correct way would probably be to create a name-spaced endpoint like

POST | /session/{session id}/appium/element

But this would require updating every single Appium driver and all the bindings, and dealing with backwards compatibility would be a pain, and possibly prohibitive right now. A quick change to the spec and I think only a minor change to the Selenium grid code, and everything should just work if it makes sense to go this route.

titusfortner commented 2 years ago

Actually @shs96c, doesn't this mean what you did for By.id and such isn't spec compliant?

titusfortner commented 2 years ago

Agreed that the grid should not behave like an end node per the spec, so this is not needed.