Android 无法在Appium Mobile Hybrid应用程序上从本机切换到Webview

Android 无法在Appium Mobile Hybrid应用程序上从本机切换到Webview,android,mobile,automation,appium-android,Android,Mobile,Automation,Appium Android,我从本机上下文切换到webview上下文时收到此错误,因为我的应用程序是混合应用程序。应用程序之前正在运行/处理,我没有收到任何明显的错误 文本: [debug] [35m[W3C (992c52d6)][39m Calling AppiumDriver.getContexts() with args: ["992c52d6-f893-44f4-aa26-554a8d3c8369"] [debug] [35m[AndroidDriver][39m Getting a li

我从本机上下文切换到webview上下文时收到此错误,因为我的应用程序是混合应用程序。应用程序之前正在运行/处理,我没有收到任何明显的错误

文本:

[debug] [35m[W3C (992c52d6)][39m Calling AppiumDriver.getContexts() with args: ["992c52d6-f893-44f4-aa26-554a8d3c8369"]
[debug] [35m[AndroidDriver][39m Getting a list of available webviews
[debug] [35m[ADB][39m Running 'C:\Users\mycv21cg\AppData\Local\android-sdk\platform-tools\adb.exe -P 5037 -s LHTDU17601000834 shell cat /proc/net/unix'
[35m[AndroidDriver][39m Not checking whether webviews have active pages; use the 'ensureWebviewsHavePages' cap to turn this check on
[debug] [35m[AndroidDriver][39m Found webviews: ["WEBVIEW_chrome"]
[debug] [35m[AndroidDriver][39m Available contexts: ["NATIVE_APP","WEBVIEW_chrome"]
[debug] [35m[W3C (992c52d6)][39m Responding to client with driver.getContexts() result: ["NATIVE_APP","WEBVIEW_chrome"]
[35m[HTTP][39m [37m<-- GET /wd/hub/session/992c52d6-f893-44f4-aa26-554a8d3c8369/contexts [39m[32m200[39m [90m248 ms - 41[39m
[35m[HTTP][39m [90m[39m
NATIVE_APP--- LAMAN NITO?
WEBVIEW_chrome--- LAMAN NITO?
[35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session/992c52d6-f893-44f4-aa26-554a8d3c8369/context[39m
[35m[HTTP][39m [90m{"name":"WEBVIEW_com.cimb.ekyc"}[39m
[debug] [35m[W3C (992c52d6)][39m Calling AppiumDriver.setContext() with args: ["WEBVIEW_com.cimb.ekyc","992c52d6-f893-44f4-aa26-554a8d3c8369"]
[debug] [35m[AndroidDriver][39m Getting a list of available webviews
[debug] [35m[ADB][39m Running 'C:\Users\mycv21cg\AppData\Local\android-sdk\platform-tools\adb.exe -P 5037 -s LHTDU17601000834 shell cat /proc/net/unix'
[35m[AndroidDriver][39m Not checking whether webviews have active pages; use the 'ensureWebviewsHavePages' cap to turn this check on
[debug] [35m[AndroidDriver][39m Found webviews: ["WEBVIEW_chrome"]
[debug] [35m[AndroidDriver][39m Available contexts: ["NATIVE_APP","WEBVIEW_chrome"]
[debug] [35m[W3C (992c52d6)][39m Encountered internal error running command: NoSuchContextError: No such context found.
[debug] [35m[W3C (992c52d6)][39m     at AndroidDriver.setContext (C:\Users\mycv21cg\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\lib\commands\context.js:57:11)
[35m[HTTP][39m [37m<-- POST /wd/hub/session/992c52d6-f893-44f4-aa26-554a8d3c8369/context [39m[33m400[39m [90m258 ms - 298[39m
[35m[HTTP][39m [90m[39m
Jul 14, 2020 10:03:32 AM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '400' -> incorrect JSON status mapping for 'unknown error' (500 expected)
FAILED: EligibleApplication
io.appium.java_client.NoSuchContextException: No such context found.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
[debug][35m[W3C(992c52d6)][39m使用参数[992c52d6-f893-44f4-aa26-554a8d3c8369]调用AppiumDriver.getContexts()]
[debug][35m[AndroidDriver][39m获取可用网络视图列表
[debug][35m[ADB][39m运行'C:\Users\mycv21cg\AppData\Local\android sdk\platform tools\ADB.exe-P 5037-s LHTDU17601000834 shell cat/proc/net/unix'
[35m[AndroidDriver][39m不检查网络视图是否有活动页面;请使用“EnsureWebViewsShavePages”上限打开此检查
[debug][35m[AndroidDriver][39m已找到网络视图:[“网络视图”]
[debug][35m[AndroidDriver][39m可用上下文:[“本机应用程序”、“网络视图浏览器”]
[debug][35m[W3C(992c52d6)][39m使用驱动程序响应客户端。getContexts()结果:[“本机应用程序”、“网络视图浏览器”]
[35m[HTTP][39m[37m[39m[37mPOST[39m[37m/wd/hub/session/992c52d6-f893-44f4-aa26-554a8d3c8369/context[39m]
[35m[HTTP][39m[90m{“name”:“WEBVIEW_com.cimb.ekyc”}[39m]
[debug][35m[W3C(992c52d6)][39m使用参数调用AppiumDriver.setContext()[“WEBVIEW_com.cimb.ekyc”,“992c52d6-f893-44f4-aa26-554a8d3c8369”]
[debug][35m[AndroidDriver][39m获取可用网络视图列表
[debug][35m[ADB][39m运行'C:\Users\mycv21cg\AppData\Local\android sdk\platform tools\ADB.exe-P 5037-s LHTDU17601000834 shell cat/proc/net/unix'
[35m[AndroidDriver][39m不检查网络视图是否有活动页面;请使用“EnsureWebViewsShavePages”上限打开此检查
[debug][35m[AndroidDriver][39m已找到网络视图:[“网络视图”]
[debug][35m[AndroidDriver][39m可用上下文:[“本机应用程序”、“网络视图浏览器”]
[debug][35m[W3C(992c52d6)][39m在运行命令时遇到内部错误:NoSuchContextError:未找到此类上下文。
[debug][35m[W3C(992c52d6)][39m位于AndroidDriver.setContext(C:\Users\mycv21cg\AppData\Roaming\npm\node_modules\appium\node_modules\appium android driver\lib\commands\context.js:57:11)
[35m[HTTP][39m[37m]针对“未知错误”的JSON状态映射不正确(预计500个)
失败:EligibleApplication
io.appium.java_client.NoSuchContextException:未找到此类上下文。
构建信息:版本:“3.141.59”,修订版:“e82be7d358”,时间:“2018-11-14T08:17:03”

hi@JamesZ,请查看我问题的文本。谢谢问题已经解决。原因是应用程序已从未签名更改为已签名,并删除了调试apk版本。现在开发人员为自动化创建了一个新的未签名apk和调试apk版本。hi@JamesZ,请查看我问题的文本。谢谢问题已经解决。我原因是该应用程序已从未签名更改为已签名,并删除了调试apk版本。现在开发人员创建了一个新的未签名apk和调试apk版本以实现自动化。