简体   繁体   English

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

[英]Automated test with Appium Selenium iOS

I develop automated test with iPhone, Selenium and Appium. 我使用iPhone,Selenium和Appium开发了自动化测试。 I need to perform touch action on current screen position. 我需要在当前屏幕位置上执行触摸操作。

Can You help me? 你能帮助我吗? Do You have any sample code? 您有任何示例代码吗? I checked this solution but it doesn't work 我检查了此解决方案,但没有用

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

try to use TouchAction class this way: 尝试以这种方式使用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