Open gis2all opened 5 years ago
Hi @Assault72,
Can you please paste what WinAppDriver.exe console logs are showing?
A successful response should look something like the following:
========================================== POST /session/0A543F58-F490-4D6A-8690-B4FF7A48D4CA/touch/click HTTP/1.1 Accept: application/json, image/png Content-Length: 28 Content-Type: application/json;charset=utf-8 Host: 127.0.0.1:4723
{"element":"42.722532.4.16"} HTTP/1.1 200 OK Content-Length: 63 Content-Type: application/json
{"sessionId":"0A543F58-F490-4D6A-8690-B4FF7A48D4CA","status":0}
==========================================
Can you also try using the Actions API and see if you are able to perform a touch action using it? Check out our ActionsTouch tests as reference.
Thanks
@hassanuz Response as below:
POST /session/770D500C-940B-4C97-B71C-9898E9E60ACC/touch/click HTTP/1.1 Accept: application/json, image/png Content-Length: 29 Content-Type: application/json;charset=utf-8 Host: 127.0.0.1:4723
{"element":"42.1314982.4.15"} HTTP/1.1 500 Internal Error Content-Length: 133 Content-Type: application/json
{"status":13,"value":{"error":"unknown error","message":"An unknown error occurred in the remote end while processing the command."}}
Try work with TouchActions
, thow this exception
I guess the app itself needs to support part of the touch interfaces in Selenium. If it doesn't implement these interfaces, can't call the relevant API.
@gis2all Try to create a wrapper over WindowsDriver
public class WindowsExtendedDriver : WindowsDriver<WindowsElement>, IHasTouchScreen
{
public WindowsExtendedDriver(Uri remoteAddress, AppiumOptions AppiumOptions) : base(remoteAddress, AppiumOptions)
{
TouchScreen = new RemoteTouchScreen(this);
}
public ITouchScreen TouchScreen { get; }
}
I want to simulate the mouse scrolling action, but I found that throwing an exception whenever I use the TouchScreen class.
Here I debug the WebDriverAPI example unit test and I get this error:
Error message in cmd:
I tried to troubleshoot
But the above attempts have failed, and the issue still exists.
My test environment is as follows