WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

LongPress using x, y Coordinates not working

Open tarunsujit opened this issue 9 years ago • 7 comments

I am testing a app on Surface pro longpress in TouchActions not working using cooridnates. Please help. The longpress works when I pass webelement, but not using coordinates.

tarunsujit avatar Jan 03 '17 14:01 tarunsujit

Hi @tarunsujit,

Can you share which API you are using to perform the long press touch actions?

timotiusmargo avatar Jan 03 '17 21:01 timotiusmargo

@timotiusmargo TouchAction(driver).longPress(200,400,3000).perform()

tarunsujit avatar Jan 04 '17 14:01 tarunsujit

The appium-dot-net-driver C# client I am using doesn't seem to expose the longpress API with x and y coordinates argument. The original JSON wire protocol also only specified the one that passes an element. I.e. https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchlongclick

Which client (appium binding/programming language) are you using for your test? Can you also provide the WinAppDriver.exe log from the console window such as:

POST /session/EA9EBD51-9D6E-4B90-90F0-763F511D2A89/touch/longclick HTTP/1.1
Accept: application/json, image/png
Content-Length: 30
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723

{"element":"42.15408772.3.14"}
HTTP/1.1 200 OK
Content-Length: 63
Content-Type: application/json

{"sessionId":"EA9EBD51-9D6E-4B90-90F0-763F511D2A89","status":0}

timotiusmargo avatar Jan 05 '17 21:01 timotiusmargo

@timotiusmargo I am using Java bindings. Is there a way to do long press using co-ordinates. Please let me know

tarunsujit avatar Jan 06 '17 18:01 tarunsujit

One way that we can do a long press on a given coordinates is by calling the following API with a delay in between. https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchdown https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchup

However, those API above are not yet part of v0.7 beta. Please stay tune for upcoming release.

timotiusmargo avatar Jan 06 '17 19:01 timotiusmargo

Thanks @timotiusmargo Can you please label this as new feature or development or sort of. So that we don't miss it in next release. I will be waiting for this. thanks again.

tarunsujit avatar Jan 09 '17 15:01 tarunsujit

shipped in 0.9

yodurr avatar May 07 '17 01:05 yodurr