无法向上滚动

时间:2016-04-05 05:13:09

标签: android python python-2.7 appium

我正在使用

    action = TouchAction(self.driver)
    action.press(self.element).perform()
    height = self.element.size["height"]
    action.move_to(x=0, y=height*int(height_multiplier)).perform()

在android.But中滚动如果我将height_multiplier设为12它就可以正常工作。也可以向下滚动。但是当我给它-1-2期待时它也会向上发出错误

The coordinates provided to an interactions operation are invalid.

我已经尝试scroll(element1,element2)但它没有滚动,只是轻弹到结束。所以driver.execute不起作用,而mobile:scroll尚未实现为android.Does任何人都知道一个变通方法?部分滚动是我想要的精确

1 个答案:

答案 0 :(得分:0)

我已按如下方式向上滚动:driver.swipe(0, scrollStart, 0, scrollEnd, 2000)其中scrollStart < scrollEnd。两个值仍然必须为正以适合分辨率范围。

相关问题