Skip to content

appium-python 2.10 Android phone swipe does not work #667

@tewbie

Description

@tewbie

The problem

appium-python-client 2.10 使用driver.swipe() 在安卓手机中,无法拖动元素

Environment

  • Appium version (or git revision) that exhibits the issue:
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium:
  • Node.js version (unless using Appium.app|exe):
  • Mobile platform/version under test: Android 10
  • Real device or emulator/simulator: Real device
  • Appium CLI or Appium.app|exe:

Details

I have an operation that uses the driver.swipe() method to drag elements, This method doesn't seem to work in appium-python-client 2.10. After switching to version 1.20, the operation can be performed normally
Turn on the Android pointer position. When using version 2.10, the phone screen shows a sliding track, but elements are not dragged.

Link to Appium Logs

Create a GIST which is a paste of your full Appium logs, and link them here.

Code To reproduce issue

self.driver.swipe(start_x=start_x, start_y=start_y, end_x=end_x, end_y=end_y, duration=duration)

actions = ActionChains(self.driver)
actions.w3c_actions.pointer_action.move_to_location(start_x, start_y)
actions.w3c_actions.pointer_action.click_and_hold()
actions.w3c_actions.pointer_action.pause(3)
actions.w3c_actions.pointer_action.move_to_location(end_x, end_y)
actions.perform()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions