Scroll text area with “Terms and Conditions” on Hybrid App with Appium

萝らか妹 提交于 2019-12-13 08:22:32

问题


I have issue with scrolling "Terms and Conditions" text area to the bottom . The app is hybrid, I gave contex to know that the app is hybrid and its working driver.context("WEBVIEW_********"); , also the xpath to the text area is

/html/body/div[2]/ion-nav-view/div/div/div[2]/textarea

but I cant find a solution to scroll the text area to the last line with " All rights reserved " , so the button " I agree " to be available.


回答1:


You can swipe in an app with appium using the press method. First find the element to scroll on and then scroll down. E.g. :

TouchAction().press(el0).moveTo(el1).release()

It also works with coordinates if you wish to use that instead of webelements.

More information on touch actions can be found here : https://appium.io/docs/en/writing-running-appium/touch-actions/



来源:https://stackoverflow.com/questions/49004686/scroll-text-area-with-terms-and-conditions-on-hybrid-app-with-appium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!