本文介绍了我想滑动以查找/定位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应用程序中当前存在的元素
发布评论