不用微信,去用支付宝小程序
appium识别微信H5或者小程序是报错,请问如何解决?[MJSONWP (2548b546)] Driver proxy active, passing request on via HTTP proxy [WD Proxy] Matched '/screenshot' to command name 'getScreenshot' [WD Proxy] Proxying [GET /screenshot] to [GET http://localhost:8200/wd/hub/session/3428a193-b03e-433f-8b44-a1d408554e0c/screenshot] with no body [MJSONWP (2548b546)] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: 500 - "{\"sessionId\":\"3428a193-b03e-433f-8b44-a1d408554e0c\",\"status\":13,\"value\":\"io.appium.uiautomator2.common.exceptions.UiAutomator2Exception: Timed out after 10000 milliseconds waiting for root AccessibilityNodeInfo\\n\\tat io.appium.uiautomator2.utils.AXWindowHelpers.refreshRootAXNode(AXWindowHelpers.java:78)\\n\\tat io.appium.uiautomator2.handler.Source.safeHandle(Source.java:38)\\n\\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:37)\\n\\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:252)\\n\\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:243)\\n\\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)\\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(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.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)\\n\\tat io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)\\n\\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)\\n\\tat io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)\\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.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)\\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.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)\\n\\tat io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)\\n\\tat io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)\\n\\tat io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)\\n\\tat io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)\\n\\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)\\n\\tat io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)\\n\\tat io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)\\n\\tat java.lang.Thread.run(Thread.java:919)\\n\"}" [MJSONWP (2548b546)] at JWProxy.proxy (C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:183:13) [MJSONWP] Matched JSONWP error code 13 to UnknownError [HTTP] <-- GET /wd/hub/session/2548b546-d10c-40d1-9794-6a6a452ebca3/source 500 15522 ms - 3463 [HTTP] [WD Proxy] Got response with status 200: "{\"sessionId\":\"3428a193-b03e-433f-8b44-a1d408554e0c\",\"status\":0,\"value\":\"iVBORw0KGgoAAAANSUhEUgAABDgAAAlgCAYAAABtGofVAAAAAXNSR0IArs4c6QAAAARzQklUCAgI\\nCHwIZIgAACAASURBVHic7N15WJTl\\/gbwewYQZJdFQgHFUqggSVNR8oTawonEJTUpO1laaqvHNFHK\\n1NTcf1qGVq7pUTNzbTsZSpG7Eop10AyQJQRBEJmBYZn5\\/YG8zsvMwACz4v25Li\\/nfeddHhQd5p7v\\n830kxcXFKhARERERERERWTGpuQdARERERERERNRaDDiIiIiIiIiIyOox4CAiIiIiIiIiq8eAg4iI\\niIiIiIisHgMOIiIiIiIiIrJ6DDiIiIiIiIiIyOox4CAiIiIiIiIiq8eAg4iIiIiIiIisHgMOIiIi\\nIiIiIrJ6DDiIiIiIiIiIyOox4CAiIiIiIiIiq8eAg4iIiIiIiIisHgMOIiIiIiIiIrJ6DDiIiIiI\\niIiIyOox4CAiIiIiIiIiq8eAg4iIiIiIiIisHgMOIiIiIiIiIrJ6DDiIiIiIiIiIyOox4CAiIiIi\\nIiIiq8eAg4iIiIiIiIisHgMOIiIiIiIiIrJ6DDiIiIiIiIiIyOox4CAiIiIiIiIiq8eAg4iIiIiI\\niIisHgMOIiIiIiIiIrJ6DDiIiIiIiIiIyOox4CAiIiIiIiIiq8eAg4iIiIiIiIisHgMOIiIiIiIi\\nIrJ6DDiIiIiIiIiIyOox4CAiIiIiIiIiq8eAg4iIiIiIiIisHgMOIiIiIiIiIrJ6DDiIiIiIiIiI\\nyOox4CAiIiIiIiIiq8eAg4iIiIiIiIisHgMOIiIiIiIiIrJ6DDiIiIiIiIiIyOox4CAiIiIiIiIi\\nq8eAg4iIiIiIiIisHgMOIiIiIiIiIrJ6DDiIiIiIiIiIyOox4CAiIiIiIiIiq8eA... [WD Proxy] Matched '/wd/hub/session/2548b546-d10c-40d1-9794-6a6a452ebca3/window/current/size' to command name 'getWindowSize' [WD Proxy] Proxying [GET /wd/hub/session/2548b546-d10c-40d1-9794-6a6a452ebca3/window/current/size] to [GET http://localhost:8200/wd/hub/session/3428a193-b03e-433f-8b44-a1d408554e0c/window/current/size] with body: {} appium版本:1.14.0 手机类型:小米 手机版本:10
2023-08-02优秀个茄子 ,appium 自动化一套在各端使用 ,非要搞个性化的自动化测试,想自定义都难。不是小程序为什不能获取页面元素呀。是因为垄断用他们自动化工具
Appium无法获取微信小程序页面元素,但是获取微信页面元素没有问题。自从今年7月份以来,微信升级后, appium就无法获取小程序页面元素了。 appium的error log: [MJSONWP (5ddd1a8c)] at JWProxy.proxy (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:213:13) [W3C] Matched W3C error code 'unknown error' to UnknownError [HTTP] <-- GET /wd/hub/session/5ddd1a8c-b45d-4505-906e-4932fe5020e6/source 500 15567 ms - 244 [HTTP] [WD Proxy] Got response with status 200: {"sessionId":"dd1cd7a1-4ed4-4c63-86c4-dbd6b2f9e60b","value":"iVBORw0KGgoAAAANSUhEUgAABDgAAAkkCAYAAAD508+vAAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N15fFT1vT\/+1+ec2SfrJEAgAwElILviAi4gaG0Fd0VbW7XLbdV6r1p\/\nt7X2am8X22rbb29duone20W7uuECqCjBBQ2KIkEQCQKBSSCEJCSZfeacz++PWTKTTJKZyWQZeD0f\nD83kzJlzPmSZzHnN+\/P+CLc3IEFERERERERElMeUkR4AEREREREREdFgMeAgIiIiIiIiorzHgIOI\niIiIiIiI8h4DDiIiIiIiIiLKeww4iIiIiIiIiCjvMeAgIiIiIiIiorzHgIOIiIiIiIiI8h4DDiIi\nIiIiIiLKeww4iIiIiIiIiCjvMeAgIiIiIiIiorzHgIOIiIiIiIiI8h4DDiIiIiIiIiLKeww4iIiI\niIiIiCjvMeAgIiIiIiIiorzHgIOIiIiIiIiI8h4DDiIiIiIiIiLKeww4iIiIiIiIiCjvMeAgIiIi\nIiIiorzHgIOIiIiIiIiI8h4DDiIiIiIiIiLKe4aRHsBosbu+Pu19LVYrnE7nEI7mWCIhtC4YGv8C\ndefPoAo\/ZEAHdAmhAFrIBG3OXQhVfQ0wlgAQIz1g6sPVn7kMR5qbIQAIiPh3SiT8hx7bkeI2AMgU\nt2X0\/zJ6O3G7jG4vHzcOT7763OD\/MURERERp8Hq9aGpsRP3u9K8VYqqnVmNCZSVsNtsQjIyIUjnu\nA441a1bjpTVrMn7cl667DgsWnjkEIxqYy+VCe3sbXC4XAMDn9cLlcqGsrAyOsjIAgMPhQJmjDFOr\nq0dkjICEqf4\/oLqehAxFAg3oEpouI1esOoCwBPQA1A9+CGXzD6AA0E64EsEz\/oyRDjqCwSDWrXsF\nUkp89rOfg8lkGtHx... [WD Proxy] Matched '/wd/hub/session/5ddd1a8c-b45d-4505-906e-4932fe5020e6/window/current/size' to command name 'getWindowSize' [WD Proxy] Proxying [GET /wd/hub/session/5ddd1a8c-b45d-4505-906e-4932fe5020e6/window/current/size] to [GET http://localhost:8200/wd/hub/session/dd1cd7a1-4ed4-4c63-86c4-dbd6b2f9e60b/window/current/size] with body: {} [MJSONWP (5ddd1a8c)] Responding to client with driver.getScreenshot() result: "iVBORw0KGgoAAAANSUhEUgAABDgAAAkkCAYAAAD508+vAAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N15fFT1vT/+1+ec2SfrJEAgAwElILviAi4gaG0Fd0VbW7XLbdV6r1p/\nt7X2am8X22rbb29duone20W7uuECqCjBBQ2KIkEQCQKBSSCEJCSZfeacz++PWTKTTJKZyWQZeD0f\nD83kzJlzPmSZzHnN+/P+CLc3IEFERERERERElMeUkR4AEREREREREdFgMeAgIiIiIiIiorzHgIOI\niIiIiIiI8h4DDiIiIiIiIiLKeww4iIiIiIiIiCjvMeAgIiIiIiIiorzHgIOIiIiIiIiI8h4DDiIi\nIiIiIiLKeww4iIiIiIiIiCjvMeAgIiIiIiIiorzHgIOIiIiIiIiI8h4DDiIiIiIiIiLKeww4iIiI\niIiIiCjvMeAgIiIiIiIiorzHgIOIiIiIiIiI8h4DDiIiIiIiIiLKeww4iIiIiIiIiCjvMeAgIiIi\nIiIiorzHgIOIiIiIiIiI8h4DDiIiIiIiIiLKe4aRHsBosbu+Pu19LVYrnE7nEI7mWCIhtC4YGv8C\ndefPoAo/ZEAHdAmhAFrIBG3OXQhVfQ0wlgAQIz1g6sPVn7kMR5qbIQAIiPh3SiT8hx7bkeI2AMgU\nt2X0/zJ6O3G7jG4vHzcOT7763OD/MURERERp8Hq9aGpsRP3u9K8VYqqnVmNCZSVsNtsQjIyIUjnu\nA441a1bjpTVrMn7cl667DgsWnjkEIxqYy+VCe3sbXC4XAMDn9cLlcqGsrAyOsjIAgMPhQJmjDFOr\nq0dkjICEqf4/oLqehAxFAg3oEpouI1esOoCwBPQA1A9+CGXzD6AA0E64EsEz/oyRDjqCwSDWrXsF\nUkp89rOfg8lkGtHxjAYCwJFDh+PhRneogaRtSPGxL8khRuJt2WubDokx48YN8l9BRERElJ4NNTVY\nu3Y1fF... [HTTP] <-- GET /wd/hub/session/5ddd1a8c-b45d-4505-906e-4932fe5020e6/screenshot 200 16205 ms - 828480 [HTTP] [WD Proxy] Got response with status 200: {"sessionId":"dd1cd7a1-4ed4-4c63-86c4-dbd6b2f9e60b","value":{"height":2139,"width":1080}} [WD Proxy] Replacing sessionId dd1cd7a1-4ed4-4c63-86c4-dbd6b2f9e60b with 5ddd1a8c-b45d-4505-906e-4932fe5020e6 [HTTP] <-- GET /wd/hub/session/5ddd1a8c-b45d-4505-906e-4932fe5020e6/window/current/size 200 16327 ms - 100 获取页面元素超时:GET /wd/hub/session/5ddd1a8c-b45d-4505-906e-4932fe5020e6/source 500 selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Timed out after 10000 milliseconds waiting for root AccessibilityNodeInfo 如果把微信降级到老版本的话这个问题就不发生了。 但是微信会自动升级,所以测试开发的时候总是要先降级才能用。 很恼人的一个问题。 希望微信端能把这个问题解了。
2023-08-02