Hello,
I am trying to scroll screen down using appium and python. Elements n my app doesn’t have IDs and text, so I’m using xpath with content-desc and indexes. I am searching internet to find answers and non is working properly.
When I have ID of course it works fine but without it it’s really problematic.
When I used something like that:
els = self.driver.find_elements_by_class_name(“android.view.View”)
self.driver.scroll(els[9], els[0])
something is happening and app is scrolled a little bit but it is not the correct place.
For example I have to elements on one screen:
origin_element = self.driver.find_element_by_xpath("//android.widget.FrameLayout"
"//android.widget.LinearLayout"
"//android.widget.FrameLayout"
"//android.widget.FrameLayout"
"//android.widget.FrameLayout"
"//android.widget.FrameLayout"
"//android.webkit.WebView"
"//android.view.View"
"//android.widget.ListView"
"//android.view.View"
"//android.widget.EditText")
destination_element = self.driver.find_element_by_xpath("//android.widget.FrameLayout"
"//android.widget.LinearLayout"
"//android.widget.FrameLayout"
"//android.widget.FrameLayout"
"//android.widget.FrameLayout"
"//android.widget.FrameLayout"
"//android.webkit.WebView"
"//android.view.View"
"//android.widget.ListView"
"//android.view.View"
"//android.view.View[@content-desc='Communications']")
I am really noob in selenium, appium and python so please notice that
Can anyone help me with this problem?