#74 楼 @D6666666 没有呢,刚去 github 提了个 bug ( https://github.com/appium/appium/issues/7863 ),不过看起来像是微信的 bug。
#72 楼 @D6666666 有的!在 webview 里进另一个页面再去find_element
的话,服务端会报ESOCKETTIMEDOUT
的错误。
[MJSONWP] Encountered internal error running command: Error: Could not proxy. Proxy error: Could not proxy command to remote server. Original error: Error: ESOCKETTIMEDOUT
at doJwpProxy$ (../../../lib/mjsonwp/mjsonwp.js:343:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
谢谢楼主,很赞!
其实楼主的意思就是现在 Appium 切换 context 到 webview 的时候有 bug,所以新建 Appium 实例的时候需要加个参数,Ruby 的代码没这么复杂
caps =
{ "platformName" => "Android",
"platformVersion" => "5.1",
"deviceName" => "",
"appPkg" => "com.tencent.mm",
"appWaitPackage" => "com.tencent.mm",
"appActivity" => ".ui.LauncherUI",
"appWaitActivity" => ".ui.LauncherUI",
"noReset" => true,
"chromeOptions" => { "androidProcess" => "com.tencent.mm:tools" } }
Appium::Driver.new(caps: caps).start_driver