繁体   English   中英

使用Appium Selenium iOS进行自动化测试

[英]Automated test with Appium Selenium iOS

我使用iPhone,Selenium和Appium开发了自动化测试。 我需要在当前屏幕位置上执行触摸操作。

你能帮助我吗? 您有任何示例代码吗? 我检查了此解决方案,但没有用

new TouchActions(wd).down(0, 0).move(150, 0).perform();

尝试以这种方式使用TouchAction类:

TouchAction action = new TouchAction();
action.longPress(webElement).moveTo(webElement).release().perform();
    TouchAction touchAction = new TouchAction(appiumDriver);
    System.out.println(startx+" "+starty);
    System.out.println("Entering swipe");

        System.out.println("Swipe from "+startx +" " +starty +"to" +endx +" " +endy );
        touchAction.press(startx, starty).waitAction(duration).moveTo(endx,endy).release().perform();

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM