滚动带有“条款和条件"的文本区域.在与Appium混合的应用程序上 [英] Scroll text area with "Terms and Conditions" on Hybrid App with Appium

查看:87
本文介绍了滚动带有“条款和条件"的文本区域.在与Appium混合的应用程序上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在将"条款和条件"文本区域滚动到底部时,我遇到了问题.该应用程序是混合的,我让contex知道该应用程序是混合的,并且可以正常工作 driver.context("WEBVIEW_********"); ,文本区域的 xpath 也是

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.

推荐答案

您可以使用press方法在带有appium的应用程序中滑动.首先找到要滚动的元素,然后向下滚动.例如. :

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.

有关触摸操作的更多信息,请参见: https://appium.io/docs/zh-CN/writing-running-appium/touch-actions/

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

这篇关于滚动带有“条款和条件"的文本区域.在与Appium混合的应用程序上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆