question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

touchAction.Perform() using simple MoveTo() gives server error expecting element

See original GitHub issue

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:

  • Appium 1.6.4 (server)
  • NuGet Appium.WebDriver 3.0.0.2 (test client)
  • Windows 10 version 1703

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
fru2zzycommented, Jul 30, 2020

Any updates? Still having the same issue, tried everything! Nothing helps!

1reaction
yodurrcommented, Apr 27, 2017

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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scroll in android app + appium with TouchActions
moveTo (anchor, endPoint).release().perform();" that is "The constructor TouchAction(AppiumDriver) is undefined" can you please help me with this ...
Read more >
TouchAction .perform returns error - Method has not yet ...
I'm quiet new to Appium so maybe this is really simple to answer, but I just don't know what to do next. Setup:...
Read more >
How to use touch actions in Appium?
The moveTo method, which is part of the Touch Action Class, helps drop the element to its intended place based on x and...
Read more >
MoveTargetOutOfBoundsExcepti...
Want to learn how to use MoveTargetOutOfBoundsException class in org.openqa.selenium.interactions package for your next Selenium project?
Read more >
How to Use Touch Actions in Appium: Swipe Tap Touch
Press by using an element and duration (in seconds); Press by using x,y coordinates, and duration (in seconds); Horizontal swipe by using the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found