-
-
Notifications
You must be signed in to change notification settings - Fork 764
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
PageObjects gets elements API instead of element API #549
Comments
@saikrishna321 |
@TikhomirovSergey giving it a try now.. What does @AndroidFindBySet do ? |
It makes AndroidFindBy repeatable. |
@TikhomirovSergey still the same, it just gets the default first locator's text value |
@saikrishna321 Also if it is the chain by default you may not define Please take a look at the updated WIKI chapter |
@saikrishna321 driver.findElementByAndroidUIAutomator("new UiSelector().resourceId(\"org.wordpress.android:id/note_subject\").enabled(true).instance(2)")
.findElementByAndroidUIAutomator("new UiSelector().resourceId(\"org.wordpress.android:id/note_subject\")") ? |
With this as well the logs are same. Here it picks the command with instance(3) https://gist.github.com/anonymous/cc08201899d52d47322604d3954817a3#file-updated-gist-with-androidfindby-L1132 and still looks for all elements
It gives the Text at the Third view which is expected :) |
So does this code works well driver.findElementByAndroidUIAutomator("new UiSelector().resourceId(\"org.wordpress.android:id/note_subject\").enabled(true).instance(2)")
.findElementByAndroidUIAutomator("new UiSelector().resourceId(\"org.wordpress.android:id/note_subject\")") ? |
@TikhomirovSergey
https://gist.github.com/saikrishna321/a156e5c88a9787c0794bca7646ec47cf Yah, i just tried with 4.1.2 and its the same. Chaining with unique ID's works, but with uiAutomation does not. Looks like we need to fix |
Yep. I will try to search for the root cause on the 1 Jan. For now please use xpath instead. |
Cheers, this is required for the appium workshop(http://thoughtworks-bangalore.github.io/vodQA-Shots/) so will wait for the fix |
@saikrishna321 @AndroidFindBy(xpath = "(.//*[@resource-id='org.wordpress.android:id/note_content_container'])[position()=2]"),
@AndroidFindBy(uiAutomator = "new UiSelector().resourceId(\"org.wordpress.android:id/note_subject\")")
MobileElement element; |
@TikhomirovSergey its calling elements instead of element api, can you please help in pointing where we call this api |
yes. I really think that root cause is here. But I can check it only tomorrow or on the 1 Jan. |
myself and @SrinivasanTarget are looking at it, if we break through will send a PR |
@saikrishna321 |
Ok. Could you please try this driver.findElenent(new ByChained(...)) using your AndroidUIAtomator locators? |
@TikhomirovSergey need help on this
Works fine
Does not work
https://gist.github.com/anonymous/d4440cab5e3213f9084498471201cd84
The above works fine, when we cast AndroidDriver
https://gist.github.com/anonymous/3b1fcc5761c370a1025d52c42b60b9fd
The text was updated successfully, but these errors were encountered: