Not sure if I'm calling this correctly or not, but performing a simple MoveTo() doesn't work and results in a server error that expects an Element.
C#
var action = new TouchAction(appSession);
action.MoveTo(100, 100);
action.Perform();
PowerShell output:
[HTTP] --> POST /wd/hub/session/59462e87-6e0a-4088-ac30-9deb9465b248/touch/perform {"actions":[{"action":"moveTo","options":{"x":100,"y":100}}]}
[MJSONWP] Driver proxy active, passing request on via HTTP proxy
[debug] [JSONWP Proxy] Proxying [POST /wd/hub/session/59462e87-6e0a-4088-ac30-9deb9465b248/touch/perform] to [POST http://127.0.0.1:4726/wd/hub/session/8EC51C1D-C96E-4163-8728-639D5D08AD41/touch/perform] with body: {"actions":[{"action":"moveTo","options":{"x":100,"
y":100}}]}
[WinAppDriver] [STDOUT]
[WinAppDriver] [STDOUT]
[WinAppDriver] [STDOUT] ==========================================
[WinAppDriver] [STDOUT] POST /wd/hub/session/8EC51C1D-C96E-4163-8728-639D5D08AD41/touch/perform HTTP/1.1
[WinAppDriver] [STDOUT] Accept: */*
[WinAppDriver] [STDOUT] Connection: keep-alive
[WinAppDriver] [STDOUT] Content-Length: 61
[WinAppDriver] [STDOUT] Content-Type: application/json
[WinAppDriver] [STDOUT] Host: 127.0.0.1:4726
[WinAppDriver] [STDOUT] User-Agent: appium
[WinAppDriver] [STDOUT]
[WinAppDriver] [STDOUT] {"actions":[{"action":"moveTo","options":{"x":100,"y":100}}]}
[WinAppDriver] [STDOUT] HTTP/1.1 400 Bad Request
[WinAppDriver] [STDOUT] Content-Length: 98
[WinAppDriver] [STDOUT] Content-Type: application/json
[WinAppDriver] [STDOUT]
[WinAppDriver] [STDOUT] {"status":100,"value":{"error":"invalid argument","message":"Missing Command Parameter: element"}}
[MJSONWP] Encountered internal error running command: {"jsonwp":{"status":100,"value":{"error":"invalid argument","message":"Missing Command Parameter: element"}}} ProxyRequestError: Could not proxy command to remote server. Original error: 400 - {"status":100,"val
ue":{"error":"invalid argument","message":"Missing Command Parameter: element"}}
at JWProxy.proxy$ (../../../lib/jsonwp-proxy/proxy.js:144:13)
at tryCatch (C:\Users\myuser\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\myuser\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\myuser\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\Users\myuser\AppData\Roaming\npm\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session/59462e87-6e0a-4088-ac30-9deb9465b248/touch/perform 500 17 ms - 186
This is using:
Hi @trevordunn we're working on getting support for this API released to you soon. Stay tuned!
Ah, didn't notice it wasn't listed here https://github.com/Microsoft/WinAppDriver#currently-supported-apis. Thanks @yodurr!
I just recorded a video showing it working, so while it's not released yet I can tell you we're definitely getting close now :)
@yodurr Can you provide a sample of it working with WinAppDriver or the link to the video. Thanks!
Any updates? Still having the same issue, tried everything! Nothing helps!
Most helpful comment
Any updates? Still having the same issue, tried everything! Nothing helps!