English 中文(简体)
[Python][Appium][Uiautomator2] 无法找到所要求的资源
原标题:[Python][Appium][Uiautomator2]The requested resource could not be found

I m 面临与 App和UiAutom器一道在安乐器测试中进行接种的问题

Appium v2.5.1 [email protected]

记录:

[HTTP] --> POST /wd/hub/session/30ea7661-385b-4642-a3c3-b64346a5fe84/touch/perform
[HTTP] {"actions":[{"action":"press","options":{"x":0,"y":755}},{"action":"moveTo","options":{"x":0,"y":50}},{"action":"release","options":{}}]}
[AndroidUiautomator2Driver@c0a4 (30ea7661)] 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@c0a4 (30ea7661)] Driver proxy active, passing request on via HTTP proxy
[AndroidUiautomator2Driver@c0a4 (30ea7661)] Matched  /wd/hub/session/30ea7661-385b-4642-a3c3-b64346a5fe84/touch/perform  to command name  performTouch 
[AndroidUiautomator2Driver@c0a4 (30ea7661)] Proxying [POST /wd/hub/session/30ea7661-385b-4642-a3c3-b64346a5fe84/touch/perform] to [POST http://127.0.0.1:8200/session/bee258ad-6bbe-4b77-9413-236b6fb3172e/touch/perform] with body: {"actions":[{"action":"press","options":{"x":0,"y":755}},{"action":"moveTo","options":{"x":0,"y":50}},{"action":"release","options":{}}]}
[AndroidUiautomator2Driver@c0a4 (30ea7661)] 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
	at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:84)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandler...

我如何解决这一问题?

I tried to run this without /wd/hub but still face the same issue( And I tried to downgrade Appium to 2.2.2 and UIautomator to 2.43.4 and same result again but without message about deprecation(

问题回答

I have the same issue. My code was working perfectly on Windows PC with my Android phone. Then I used this phone to run the code on the Ubuntu PC that I just build up. After that the issue happens on both Ubuntu and Windows PCs. I do factory reset the phone and the issue is gone. Appium log





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签