我想滑动以查找/定位IOS应用程序中当前存在的元素

编程入门 行业动态 更新时间:2024-10-19 14:37:11
本文介绍了我想滑动以查找/定位IOS应用程序中当前存在的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个Ios应用,正在对其进行UI自动化.我有一个向下滚动页面的元素/按钮.我已经看到,appium已经贬低了大多数功能,例如滚动,移动和滑动.因为所有帮助都与此有关.我正在使用Appium版本1.13.0(1.13.0.20190505.5)

I have an Ios app and I'm doing UI automation of it. I have an element/button that is one scroll down the page. I have seen that appium has depreciated most of the functions like scroll, moveto and swipe. since all of the help is related to that. I am using Appium Version 1.13.0 (1.13.0.20190505.5)

推荐答案

使用该方法代替appium方法:

Use that method instead of appium methods:

JavascriptExecutor js = (JavascriptExecutor) driver; HashMap<String, String> scrollObject = new HashMap<>(); scrollObject.put("direction", "down"); js.executeScript("mobile: swipe", scrollObject);

如果要向上滑动,请将direction向上更改

change direction to up if you want to swipe up

更多推荐

我想滑动以查找/定位IOS应用程序中当前存在的元素

本文发布于:2023-11-27 19:03:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1639230.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我想   应用程序   元素   IOS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!