问题
在使用Appium Inspector
对安卓-微医生APP登陆页元素获取的时候发现无法获取到内容,Appium报错如下:
[HTTP] --> GET /wd/hub/session/669c743a-cede-43f2-8950-019af660f2f6/screenshot
[HTTP] {}
[MJSONWP (669c743a)] Calling AppiumDriver.getScreenshot() with args: ["669c743a-cede-43f2-8950-019af660f2f6"]
[WD Proxy] Matched '/screenshot' to command name 'getScreenshot'
[WD Proxy] Proxying [GET /screenshot] to [GET http://127.0.0.1:8200/wd/hub/session/fb84ef2a-405f-4983-b2c4-f833ec8b5562/screenshot] with no body
[WD Proxy] Got response with status 500: {"sessionId":"fb84ef2a-405f-4983-b2c4-f833ec8b5562","value":{"error":"unable to capture screen","message":"Failed to capture a screenshot. Does the current view have 'secure' flag set?","stacktrace":"io.appium.uiautomator2.common.exceptions.TakeScreenshotException: Failed to capture a screenshot. Does the current view have 'secure' flag set?\n\tat io.appium.uiautomator2.utils.ScreenshotHelper.takeDeviceScreenshot(ScreenshotHelper.java:131)\n\tat io.appium.uiautomator2.utils.ScreenshotHelper.takeScreenshot(ScreenshotHelper.java:61)\n\tat io.appium.uiautomator2.utils.ScreenshotHelper.takeScreenshot(ScreenshotHelper.java:79)\n\tat io.appium.uiautomator2.handler.CaptureScreenshot.safeHandle(CaptureScreenshot.java:32)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:41)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:262)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:256)\n\tat io.appium.uia...
[W3C] Matched W3C error code 'unable to capture screen' to UnableToCaptureScreen
[MJSONWP (669c743a)] Encountered internal error running command: io.appium.uiautomator2.common.exceptions.TakeScreenshotException: Fai