简体   繁体   中英

Scroll text area with "Terms and Conditions" on Hybrid App with Appium

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.

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

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM