从右向左在Android appium中滑动

问题描述

我尝试执行滑动操作,即使用以下方法从右向左滑动。我得到的结果是通过,但操作没有执行。

你们能检查一下并让我知道为了使此功能起作用我应该保持什么坐标。

//按百分比水平滑动

public void horizo​​ntalSwipeByPercentage(两次startPercentage,两次endPercentage,两次anchorPercentage,int持续时间){

Dimension size = driver.manage().window().getSize();

int anchor = (int) (size.height * anchorPercentage);

int startPoint = (int) (size.width * startPercentage);

int endPoint = (int) (size.width * endPercentage);

new TouchAction(driver)

        .press(point(startPoint,anchor))

        .waitaction(waitOptions(ofMillis(1000)))

        .moveto(point(endPoint,anchor))

        .release().perform();

}

public void horizontalSwipe()

  {

    

        horizontalSwipeByPercentage (0.9,0.01,0.5,3000);

    }

认测试

Tests run: 1,Failures: 0,Skips: 0

================================================

================================================

认套件

运行的总测试次数:1,通过:1,失败:0,跳过:0

================================================

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)