microsoft / WinAppDriver

Windows Application Driver
MIT License
3.66k stars 1.4k forks source link

Currently only pen and touch pointer input source types are supported in UWP Desktop App #1727

Open YenikeRaghuRam opened 2 years ago

YenikeRaghuRam commented 2 years ago

selenium.common.exceptions.WebDriverException: Message: Currently only pen and touch pointer input source types are supported in UWP Desktop App

When performing click operation using TouchActions Selenium

Environment Appium -python - client: 2.2.0 Selenium : 4.1.5 WinAppDriver - v1.2.1]

Code To Reproduce Issue [ Good To Have ] desired_caps = dict( noReset=True, clearSystemFiles=True, platformName='Windows', deviceName='WindowsPC', platformVersion='10', automationName='Windows', createSessionTimeout='60000', app="CarrierTransicold.ContainerLINK_b3cjpzkqb6qq2!App", forceMjsonwp=True ) driver = webdriver.Remote('http://localhost:4723/', desired_caps)

desktopaction = ActionChains(driver) desktopaction.move_to_element(e2).click().perform() Also tried with actions = ActionChains(driver) actions.w3c_actions.mouse = PointerInput(interaction.POINTER_TOUCH, "touch") actions.click(e2).click().perform()

========================================== POST /session/179037E9-A042-47FD-8F82-E1D9CF88149E/actions HTTP/1.1 Accept: application/json Accept-Encoding: identity Connection: keep-alive Content-Length: 651 Content-Type: application/json;charset=UTF-8 Host: localhost:4723 User-Agent: appium/python 2.2.0 (selenium/4.1.5 (python windows))

{"actions": [{"type": "pointer", "parameters": {"pointerType": "mouse"}, "id": "mouse", "actions": [{"type": "pointerMove", "duration": 250, "x": 0, "y": 0, "origin": {"element-6066-11e4-a52e-4f735466cecf": "42.919932.4.310"}}, {"type": "pointerDown", "duration": 0, "button": 0}, {"type": "pointerUp", "duration": 0, "button": 0}, {"type": "pointerDown", "duration": 0, "button": 0}, {"type": "pointerUp", "duration": 0, "button": 0}]}, {"type": "key", "id": "key", "actions": [{"type": "pause", "duration": 0}, {"type": "pause", "duration": 0}, {"type": "pause", "duration": 0}, {"type": "pause", "duration": 0}, {"type": "pause", "duration": 0}]}]} HTTP/1.1 500 Internal Error Content-Length: 138 Content-Type: application/json

{"status":104,"value":{"error":"unsupported operation","message":"Currently only pen and touch pointer input source types are supported"}}

raised as its specific to WinAppDriver Refer https://github.com/appium/appium/issues/17018

pdisser8 commented 1 year ago

unfortunately appium-python-client past v1.3.0 / selenium 3.14.1 won't support the old JSON Wire Gesture Standard, You'll need to downgrade to these to in order to use with WinAppDriver (as WinAppDriver will likely never support the new W3C standard)