Sitelet https://github.com/appium/python-client/issues/592
Skip to content

ActionChains in W3C works only 'mouse', want to change it to other types #592

Description

@vong0

The problem

Hi, so I'm currently trying to use selenium "ActionChains" with the "appium-python-client" on Windows 10 with the WinAppDriver.

  • On appium versions v1.19.1 (+ any prior to v1.20.0), any action chain event seems to work
  • However, on v1.20.0+ I keep receiving the following exception message

Note the the same:

  • code and version of "appium-python-client" was used
  • each version of appium tested also used the same WinAppDriver v1.2-RC (as printed by npm install -g appium@)

Therefore, it seems that the issue stems from the "appium" library and not "WinAppDriver" nor the "appium-python-client".

Traceback (most recent call last):
  File "C:/p4/perforce/depot/qa/tests/licensing/Fuse/dev/tests/failure.py", line 19, in <module>
    actions.double_click(two).perform()
  File "C:\p4\perforce\depot\qa\tests\licensing\Fuse\dev\venv-379\lib\site-packages\selenium\webdriver\common\action_chains.py", line 80, in perform
    self.w3c_actions.perform()
  File "C:\p4\perforce\depot\qa\tests\licensing\Fuse\dev\venv-379\lib\site-packages\selenium\webdriver\common\actions\action_builder.py", line 76, in perform
    self.driver.execute(Command.W3C_ACTIONS, enc)
  File "C:\p4\perforce\depot\qa\tests\licensing\Fuse\dev\venv-379\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\p4\perforce\depot\qa\tests\licensing\Fuse\dev\venv-379\lib\site-packages\appium\webdriver\errorhandler.py", line 31, in check_response
    raise wde
  File "C:\p4\perforce\depot\qa\tests\licensing\Fuse\dev\venv-379\lib\site-packages\appium\webdriver\errorhandler.py", line 26, in check_response
    super().check_response(response)
  File "C:\p4\perforce\depot\qa\tests\licensing\Fuse\dev\venv-379\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Currently only pen and touch pointer input source types are supported

Environment

  • Python version: Python 3.7.9 (but reproducible on any Python3 version)
  • Appium version (or git revision) that exhibits the issue: v.1.20.0+
  • Last Appium version that did not exhibit the issue (if applicable): v1.19.1 (any version before v.1.20.0)
  • Desktop OS/version used to run Appium: Windows 10 (any version)
  • Node.js version: 14.15.4 (should not matter though)
  • Npm version: 6.14.10 (should not matter though)

Link to Appium logs

https://gist.github.com/vong0/727ef226073466324ae5631e029fcd13 (logs of both success and fail version)

Code To Reproduce Issue [ Good To Have ]

  1. Create a virtual environment and only install Appium-Python-Client==1.0.2
  2. Install appium failing version npm install -g appium@1.20.0
  3. Run the following code segment and check that it fails
  4. Rerun the code segment for a successful version npm install -g appium@1.19.1
from appium import webdriver
from selenium.webdriver.common.action_chains import ActionChains

"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"

desired_caps = {"app": "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App",
                "platformName": "Windows",
                "deviceName": "WindowsPC",
                "newCommandTimeout": 10000}
app = webdriver.Remote(command_executor='http://127.0.0.1:4723/wd/hub',
                       desired_capabilities=desired_caps)

# Normal actions work
two = app.find_element_by_name("Two")
two.click()

# Any ActionChain event fails
actions = ActionChains(app)
actions.double_click(two).perform()
# actions.move_to_element(two).perform()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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