【发布时间】:2019-10-24 19:04:36
【问题描述】:
我正在 appium 中使用 Python 进行移动自动化,但它在向下滚动页面时不断给我一个错误。除了滚动页面外,一切正常。
这是代码:
actions = TouchAction(driver)
actions.scroll_from_element(element, 10, 100)
actions.scroll(10, 100)
actions.perform()
这是错误:
AttributeError: 'TouchAction' object has no attribute 'scroll_from_element'
【问题讨论】:
-
尝试从 selenium.webdriver.common.touch_actions import TouchActions 而不是 from appium.webdriver.common.touch_action import TouchAction 导入。
标签: python automation appium