-
-
Notifications
You must be signed in to change notification settings - Fork 444
Add class chain locator to XCUITest driver #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can you write up a little bit about what this is and how to use it? We will also need an issue to track getting support into clients, or else it is not usable. |
@imurchie I can also create PRs for java_client (and, probably, for ruby and python clients as well). The only thing I don't like there is C# }:-) |
This description can also be found at https://github.com/facebook/WebDriverAgent/wiki/Queries The class chain query type is similar to xpath, but can only include indexes and valid class names. Only search by direct children elements of the current element is supported. Examples of such requests: This query type has been added as a quick patch to speed up complicated xpath queries containing many levels of nested nodes and not containing xpath function calls or attributes comparison (such locators are not recommended at all, but people still use them though) OR to combine them with predicate search, since location by predicates does not respect nodes hierarchy. For example: The xpath locator
might be times slower than
and then apply predicate search to the previous result:
|
Sounds good. Once we have client implementations we'll need to add real documentation on its usage somewhere. |
@imurchie Just let me know where to add ;) |
I'll have to think about it! But it is not necessary until we have ways of sending in the query. |
great work on getting a faster xpath-like query into WDA, @mykola-mokhnach |
Thanks @jlipps. Also a nice piece of experience for me. It was literally implemented for the whole chain starting from WDA (ObjC) to Appium Server (NodeJS) and then Appium Java Client (java). There are also plans to do it for Python client when I have time and mood. |
🎉 that's fantastic |
//XCUIElementTypeTable/XCUIElementTypeCell/XCUIElementTypeStaticText[@name="XXX"]/parent::XCUIElementTypeCell/XCUIElementTypeStaticText |
Add a new locator type for XCUITest-based driver. See facebookarchive/WebDriverAgent#442 for more details.