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

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

问题描述

我在将条款和条件"文本区域滚动到底部时遇到问题.该应用程序是混合的,我提供了上下文以了解该应用程序是混合的并且可以正常工作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.

推荐答案

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

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()

如果您希望使用坐标代替 webelement,它也适用于坐标.

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

可以在此处找到有关触摸操作的更多信息:https://appium.io/docs/en/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天全站免登陆