Repository navigation
Confusion about scrolling #190
Description
Activity
I'm not sure your code and logs. But the followings may help your case, I think.
(In my experience, I can scroll with the followings.)- for: UiScrollable (The behaviour depends on Android OS side)
driver.find_element_by_android_uiautomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(someElement.instance(0));")- for TouchActions
- We can also use '.swipe', though.
- for mobile: scroll
- XCUITest and required Appium 1.6.4+
Hi, I am talking about Android, not IOS.
Yaeh, i tried the Uiscrollable thing. It doesn't work. Maybe i'll try it again today.
I just think that scrolling shouldn't be this complicated. The Appium team should prioritise fixing it. How can something so fundamental to using a phone have so much confusion surrounding it? It doesn't make sense. Something isn't right.
Reacted by sumanthvakacharlaHey, do you think I am having problems because I am initializing my driver like this:
cls.phone = webdriver.Remote(host, desired_caps)See, I am calling the Remote method. But apparently there's one specific to Android (https://github.com/appium/appium-android-driver) ? Should I be using that? The docs don't make this clear at all...
Is the Appium team going to get someone to create a narrative documentation of everything? Because as of now, the extent of the documentation is fragments of contradictory info floating around the internet.
Specifically:
what the heck is uiautomaror? What the heck is uiautomator2? Why doesn't Appium 1.7.1 default to uiautomator2. Should I even use uiautomator2? What is Selenedroid? What is the difference between the Remote driver and the Android driver? I mean, what the heck is this https://github.com/appium/appium-android-driver?
Reacted by sumanthvakacharlaReacted by sumanthvakacharlaAccording to the document, UiAutomator2 is preferred. And you also can see about drivers from this documentation .
You can try this to perform swipe down in Android:
self.driver.swipe(470, 1400, 470, 950, 330) #self.driver.swipe(start_x, start_y, end_x, end_y, duration)you can use a try, except logic to check if an element is present or not after each swipe.
Reacted by achaudhral629 and Abacchio
I haven't been able to find what the final word on scrolling in Android is. According to the python source code, there is a method
scroll. But it doesn't work.According to the Android docs, there's a thing called
UiScrollable. But it doesn't work.According to the appium docs, there's a thing called
TouchActions. But it doesn't work.driver.execute_script("mobile: scroll", {"direction": 'down', 'element': el})If you do this, you are told that "the method has not yet been implemented".
So what is the final word on scrolling? That it's completely broken? That
scrollis supposed to work, and that there is something wrong with my setup?