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
UiScrollable support in android uiautomator #2264
Comments
@jlipps If the intent is to have the tutorial/documentation demo the proper way to scroll on Android, then this should be fixed as part of 1.0. Currently mobile find is the only endpoint capable of scrolling to a UiSelector. |
ok, added to 1.0 milestone |
Is this still planned for 1.0? If so, I don't think we want to ship the old mobile find in the appium bindings. Currently the only reason it's worth keeping is scrolling. |
I think it'd be nice to get rid of the old complex find. @Jonahss any ideas about how long this would take? |
We're still supporting complex_find in 1.0, so I'm moving this to 1.1 |
👍 |
Another feature that complex_find supports is matching on multiple selectors.
It'll match on enabled or clickable. I think |
Why couldn't one just run two finds, then concatenate the lists of returned elements?
|
def find val
# s.className('android.widget.EditText').descriptionContains(value);
args = [ [4, 'android.widget.EditText'], [7, val] ],
# s.className('android.widget.EditText').textContains(value);
[ [4, 'android.widget.EditText'], [3, val] ],
# s.className('android.widget.Button').descriptionContains(value);
[ [4, 'android.widget.Button'], [7, val] ],
# s.className('android.widget.Button').textContains(value);
[ [4, 'android.widget.Button'], [3, val] ],
# s.className('android.widget.ImageButton').descriptionContains(value);
[ [4, 'android.widget.ImageButton'], [7, val] ],
# s.className('android.widget.ImageButton').textContains(value);
[ [4, 'android.widget.ImageButton'], [3, val] ],
# s.descriptionContains(value);
[ [7, val] ],
# s.textContains(value);
[ [3, val] ]
mobile :find, args
end |
So you're requesting the union of a bunch of selectors, all with a single http request? Is the overhead of requesting each of those selectors separately significant? I'm usually in favor of feature-lean APIs. |
This is already implemented in complex_find. I'm saying if we remove complex_find, then
Yes. When this code is wrapped in a wait that will be 8 find requests issued every 0.5 seconds. As is the case with XPath, it's much more desirable to include support for boolean OR. |
Okay |
Another reason to add this server side instead of having the clients concatenate the elements is duplicate detection. I'm working on adding this to complex find. |
Would we have to remove duplicates in uiautomator selectors too? so will automatically detect duplicates and dedupe? |
Yes, only if more than one selector is used to return results. For example, this is fine (no dedupe required):
|
Right, yup. |
@bootstraponline Do you think I should also include UiCollection? While I'm messing about in here. |
Sure. It seems useful. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
As discussed on #2228 and #2226. There's no way to scroll using the new
android uiautomator
locator. Mobile find could be deleted entirely ifandroid uiautomator
supported scrolling via UiScrollable.The text was updated successfully, but these errors were encountered: