码:-
public voID swipe() { JavaScriptExecutor Js = (JavaScriptExecutor) driver; HashMap < String,Double > swipeObject = new HashMap < String,Double > (); swipeObject.put("startX",0.95); swipeObject.put("startY",0.5); swipeObject.put("endX",0.05); swipeObject.put("endY",0.5); swipeObject.put("duration",1.0); Js.executeScript("emulator: swipe",swipeObject);}
错误:-
org.openqa.selenium.WebDriverException: Not yet implemented.
任何帮助很棒的apprciation.
解决方法 将上下文更改为NATIVE_APP对我有用:String originalContext = driver.getContext();driver.context("NATIVE_APP");driver.swipe(startx,starty,endx,endy,duration);driver.context(originalContext );总结
以上是内存溢出为你收集整理的在android appium中不支持滑动方法全部内容,希望文章能够帮你解决在android appium中不支持滑动方法所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)