LongPress using x, y Coordinates not working
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.
Hi @tarunsujit,
Can you share which API you are using to perform the long press touch actions?
@timotiusmargo TouchAction(driver).longPress(200,400,3000).perform()
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 I am using Java bindings. Is there a way to do long press using co-ordinates. Please let me know
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.
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.
shipped in 0.9