我是這個移動自動化的新手。我已經嘗試了下面的方法在ios7模擬器中刷卡,但他們都沒有爲我工作。如何使用appium在IOS7中滑動?
1)
HashMap<String, Integer>() map = new HashMap<String, Integer>() {
{
put("touchCount", 1);
put("startX",225);
put("startY", 500);
put("endX", 225);
put("endY", 250);
put("duration", 5);
}
};
((JavascriptExecutor) driver).executeScript("mobile: swipe", map);
2)
TouchAction touchAction = new TouchAction(driver);
touchAction.longPress(225, 500).waitAction(3000).moveTo(225,
250).release();
touchAction.perform();
3)driver.swipe(225,500,225,250,3000)
預先感謝。