-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
FindBy doc update #1311
FindBy doc update #1311
Conversation
Thanks for the PR @Cliabhach , the documentation is never enough |
As a nice bonus, this also enables syntax highlighting in compatible clients, such as the GitHub website.
Also, it looks like appium has its own WebDriverAgent repository - should I make the inline links point there instead of to facebook's old project? |
Yes, we maintain our own fork. Although, it only contains the code. Wiki does not get copied |
I'll need to add more examples, I think, but how does that look so far? |
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeCell[`name BEGINSWITH \"Foo\"`]") | ||
|
||
// Selector for every cell with a name that starts with "it's not" | ||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeCell[`name BEGINSWITH \"it's not\"`]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class chain also supports indexing, including negative indexes (e.g. -1 means the last matched element, -2 - the one before the last one, etc) . The only limitation is that the index should be the last specifier in the chain, for example **/XCUIElementTypeCell[`name == 'bla'`][-2]
is valid, but **/XCUIElementTypeCell[-2][`name == 'bla'`]
is not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are 1-based indices, it looks like. What does an index of 0 do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throws an error :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough.
yep, the doc looks great. I've also added a comment regarding indexing and deep attribute search |
Ok, I've added items for those. I'm still not 100% on putting the README in this folder - should we maybe cross-reference it from e.g. the main Appium docs? |
Oh, and I should rebase these commits so they have the |
d286e4d
to
b660c28
Compare
Not sure about the name - I don't suppose anyone has a good idea for what to call it? |
the current name is ok. We can always rename it if necessary ;) |
Change list
Advanced-By.md
file for advanced AndroidBy & iOSXCUITFindBy usageTypes of changes
What types of changes are you proposing/introducing to Java client?
Put an
x
in the boxes that applyDetails
The main goal here was to document these
uiAutomator
andiOSClassChain
attributes within the java client documentation. You'll note that the README is incomplete - I tried to use the server source code to figure out how UiScrollable works, but didn't get very far.I did find these two files in the main appium source. Should I make a pull request to update either of those instead/as well?