【问题标题】:having problem in touchactions in appium using python使用python在appium中的触摸操作有问题
【发布时间】: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'

【问题讨论】:

标签: python automation appium


【解决方案1】:

TouchAction 更改为TouchActions

from selenium import webdriver

action = webdriver.TouchActions(driver)
action.scroll_from_element(year, 0, 0).release(0, 10).perform()

【讨论】:

    猜你喜欢
    • 2018-10-22
    • 2020-01-16
    • 1970-01-01
    • 2014-09-30
    • 1970-01-01
    • 2022-08-19
    • 1970-01-01
    • 2016-11-28
    • 1970-01-01
    相关资源
    最近更新 更多