serhatbolsu / robotframework-appiumlibrary

AppiumLibrary is an appium testing library for RobotFramework
Apache License 2.0
396 stars 291 forks source link

Swipe/scroll keywords are not working with appiumlibrary when appium server updated to 2.5.1 #423

Open shreyapz opened 5 months ago

shreyapz commented 5 months ago

I am automating native android app using robot framework. When I use any gesture keywords like swipe, scroll, tap they are not working. I get the error "WebDriverException: Message: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource" in my pycharm terminal

Library versions: robotframework-appiumlibrary : 1.6.4 Appium-Python-Client : 1.3.0 Appium server : 2.5.1 ${AUTOMATION_NAME} UiAutomator2

Appium 2.5.1 server logs --> [AndroidUiautomator2Driver@91d9 (e6e024ce)] Command 'performTouch' has been deprecated and will be removed in a future version of Appium or your driver/plugin. Please use a different method or contact the driver/plugin author to add explicit support for the command before it is removed [AndroidUiautomator2Driver@91d9 (e6e024ce)] Driver proxy active, passing request on via HTTP proxy [AndroidUiautomator2Driver@91d9 (e6e024ce)] Matched '/session/e6e024ce-cc57-48c2-afee-d06dbed12ebe/touch/perform' to command name 'performTouch' [AndroidUiautomator2Driver@91d9 (e6e024ce)] Proxying [POST /session/e6e024ce-cc57-48c2-afee-d06dbed12ebe/touch/perform] to [POST http://127.0.0.1:8200/session/76553c2f-7ffb-4412-9b07-3fa64b92249b/touch/perform] with body: {"actions":[{"action":"press","options":{"x":500,"y":1500}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":500,"y":500}},{"action":"release","options":{}}]} [AndroidUiautomator2Driver@91d9 (e6e024ce)] Got response with status 404: {"sessionId":null,"value":{"error":"unknown command","message":"The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource","stacktrace":"io.appium.uiautomator2.common.exceptions.UnknownCommandException: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:84)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)\n\tat io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandler... [W3C] Matched W3C error code 'unknown command' to UnknownCommandError [HTTP] <-- POST /session/e6e024ce-cc57-48c2-afee-d06dbed12ebe/touch/perform 404 21 ms - 3529 [HTTP] [HTTP] --> GET /session/e6e024ce-cc57-48c2-afee-d06dbed12ebe/screenshot [HTTP] {}

GitAnushaa commented 4 months ago

were you able to figure out the solution for this issue? Thanks!

Dor-bl commented 3 months ago

This will not work since all of the Touch KWs are using TouchAction which is deprecated. https://github.com/serhatbolsu/robotframework-appiumlibrary/blob/master/AppiumLibrary/keywords/_touch.py#L3