还未发布过话题
  • 你可以用 chromedriver2.0 的试试放在 appium 里替换下,有些人就解决这个问题,但我没解决,报错你可以参考下

    info: JSONWP Proxy: Got response with status 200: {"sessionId":"14c1e22e74ff1d7bd20c2c1567d06ad1","status":13,"value":{"message":"unknown error: unable to discover open pages\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081...
    info: Chromedriver: Changed state to 'stopped'
    error: Chromedriver: Chromedriver exited unexpectedly with code null, signal SIGTERM
    warn: Chromedriver for context WEBVIEW_com.tencent.mm:tools stopped unexpectedly
    warn: Chromedriver quit unexpectedly, but it wasn't the active context, ignoring
    error: Chromedriver: Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: unable to discover open pages
    (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64))
    at JWProxy.command$ (lib/proxy.js:133:15)
    at tryCatch (D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke as _invoke
    at GeneratorFunctionPrototype.prototype.(anonymous function) as next
    at GeneratorFunctionPrototype.invoke (D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:136:37)
    at bound (domain.js:284:14)
    at GeneratorFunctionPrototype.runBound (domain.js:297:12)
    at run (D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_modules\core-js\library\modules\es6.promise.js:89:39)
    at D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_modules\core-js\library\modules\es6.promise.js💯28
    at flush (D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_modules\core-js\library\modules\$.microtask.js:17:13)
    at process._tickDomainCallback (node.js:381:11)
    { [Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: unable to discover open pages
    (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64))]
    status: 13,
    value: { message: 'unknown error: unable to discover open pages\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64)' },
    httpCode: 200 }
    info: <-- POST /wd/hub/session/e90cc0ac-d704-4d57-8467-d9f09b73b128/context - - ms - -
    undefined

  • 微信 webview 的自动化技术 at 2017年09月30日

    NATIVE_APP,WEBVIEW_com.android.browser,WEBVIEW_com.tencent.mm:tools,WEBVIEW_com.tencent.mm:appbrand1,WEBVIEW_com.tencent.mm:support,WEBVIEW_undefined

    info: [debug] ["WEBVIEW_com.android.browser","WEBVIEW_com.tencent.mm:tools","WEBVIEW_com.tencent.mm:appbrand1","WEBVIEW_com.tencent.mm:support","WEBVIEW_undefined"]
    info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.android.browser,WEBVIEW_com.tencent.mm:tools,WEBVIEW_com.tencent.mm:appbrand1,WEBVIEW_com.tencent.mm:support,WEBVIEW_undefined
    info: [debug] Connecting to chrome-backed webview
    info: Chromedriver: Changed state to 'starting'
    info: Chromedriver: Set chromedriver binary as: D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe
    info: Chromedriver: Killing any old chromedrivers, running: FOR /F "usebackq tokens=5" %a in (netstat -nao ^| findstr /R /C:"9515 ") do (FOR /F "usebackq" %b in (TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe) do (IF NOT %b=="" TASKKILL /F /PID %a))
    info: Chromedriver: No old chromedrivers seemed to exist
    info: Chromedriver: Spawning chromedriver with: D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\chromedriver\win\chromedriver.exe --url-base=wd/hub --port=9515
    info: Chromedriver: [STDOUT] Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 9515
    Only local connections are allowed.
    info: JSONWP Proxy: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
    info: JSONWP Proxy: Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Windows NT\",\"version\":\"10.0\"}}}"
    info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"androidProcess":"com.tencent.mm:tools","androidDeviceSerial":"ZPRWJREMMJS4NBL7"}}}
    info: JSONWP Proxy: Got response with status 200: {"sessionId":"fbe7450418f4b4a2cfe5ce0fe6f64b0d","status":13,"value":{"message":"unknown error: unable to discover open pages\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081...
    info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"androidProcess":"com.tencent.mm:tools","androidDeviceSerial":"ZPRWJREMMJS4NBL7"}}}
    info: JSONWP Proxy: Got response with status 200: {"sessionId":"0d8c048f754b19dd9d48448b5c502f72","status":13,"value":{"message":"unknown error: unable to discover open pages\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081...
    info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"androidProcess":"com.tencent.mm:tools","androidDeviceSerial":"ZPRWJREMMJS4NBL7"}}}
    info: JSONWP Proxy: Got response with status 200: {"sessionId":"37d665cf4e0c4b458285a826b02b83c6","status":13,"value":{"message":"unknown error: unable to discover open pages\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081...
    info: JSONWP Proxy: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"androidProcess":"com.tencent.mm:tools","androidDeviceSerial":"ZPRWJREMMJS4NB"}}}
    info: [debug] Didn't get a new command in 240 secs, shutting down...
    info: Shutting down appium session
    info: [debug] Pressing the HOME button
    info: [debug] executing cmd: D:\Android\android-sdk\platform-tools\adb.exe -s ZPRWJREMMJS4NB shell "input keyevent 3"
    info: [debug] Stopping logcat capture
    info: [debug] Logcat terminated with code null, signal SIGTERM
    info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
    info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
    info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
    info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
    info: [debug] [UIAUTOMATOR STDOUT] close [socket][/127.0.0.1:4724]
    info: [debug] [BOOTSTRAP] [debug] Closed client connection
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
    info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
    info: [debug] [UIAUTOMATOR STDOUT] Time: 285.977
    info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
    info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
    info: [debug] UiAutomator shut down normally
    info: [debug] Cleaning up android objects
    info: [debug] Cleaning up appium session
    info: [debug] We shut down because no new commands came in
    info: JSONWP Proxy: Got response with status 200: {"sessionId":"14c1e22e74ff1d7bd20c2c1567d06ad1","status":13,"value":{"message":"unknown error: unable to discover open pages\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081...
    info: Chromedriver: Changed state to 'stopped'
    error: Chromedriver: Chromedriver exited unexpectedly with code null, signal SIGTERM
    warn: Chromedriver for context WEBVIEW_com.tencent.mm:tools stopped unexpectedly
    warn: Chromedriver quit unexpectedly, but it wasn't the active context, ignoring
    error: Chromedriver: Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: unable to discover open pages
    (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64))
    at JWProxy.command$ (lib/proxy.js:133:15)
    at tryCatch (D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke as _invoke
    at GeneratorFunctionPrototype.prototype.(anonymous function) as next
    at GeneratorFunctionPrototype.invoke (D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:136:37)
    at bound (domain.js:284:14)
    at GeneratorFunctionPrototype.runBound (domain.js:297:12)
    at run (D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_modules\core-js\library\modules\es6.promise.js:89:39)
    at D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_modules\core-js\library\modules\es6.promise.js💯28
    at flush (D:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\node_modules\core-js\library\modules\$.microtask.js:17:13)
    at process._tickDomainCallback (node.js:381:11)
    { [Error: An unknown server-side error occurred while processing the command. (Original error: unknown error: unable to discover open pages
    (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64))]
    status: 13,
    value: { message: 'unknown error: unable to discover open pages\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 10.0 x86_64)' },
    httpCode: 200 }
    老铁,看哈哇,反正真机我各种问题都遇到过了,反正最后就是不能切换成功,我还说安卓搞好了,就用 mac 搞 ios 的,心好累,填了各种坑,还没有填平!

  • 微信 webview 的自动化技术 at 2017年09月29日

    老铁,为什么我用了 chromedriver2.20,还是报设备 is not online\n?哎,这个问题搞了一周多了,什么切换前杀 chromedriver 进程;
    什么 chromedriver 和 webview 版本不一致,我从 2.9-2.32 全部装了一遍也不行,哎,想找一个完美解决啊,社区跟 webview 切换的帖子我都看了一遍,没有完美解决的,会有各种其他问题!

  • hi,请问下各位大神,最先是我的 chrome 和 chromedriver 版本不一致导致切换 context 有问题,报 chrome not reachable 现在我已经把手机的 chrome 和 chromedriver 版本弄一致,但是又报其他错误
    get context 得到 ["WEBVIEW_com.tencent.mm:appbrand0","WEBVIEW_com.tencent.mm:tools","WEBVIEW_com.tencent.mm:support","WEBVIEW_com.tencent.mm:appbrand1","WEBVIEW_com.android.quicksearchbox"]
    日志打印的 chromeOptions
    {"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"androidProcess":"com.tencent.mm:tools","androidDeviceSerial":"ZPRWJREMM4NBL7"}}}
    最后切换的时候总是报错 Device ZPRWJREMM4NBL7 is not online\n
    info: JSONWP Proxy: Got response with status 200: {"sessionId":"bd50308685a46e4c369e386f881e9ab0","status":13,"value":{"message":"unknown error: Device ZPRWJREMM4NBL7 is not online\n (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.3...
    一直说设备不在线,我很绝望,adb devices 设备是在的,请问有没有什么好的解决方法,然后 appium 超时而失败,一直卡在着!

  • 微信 webview 的自动化技术 at 2017年09月18日

    @happystone hi,我想问下,最先是我的 chrome 和 chromedriver 版本不一致导致切换 context 有问题,报 chrome not reachable 现在我已经把手机的 chrome 和 chromedriver 版本弄一致,但是又报其他错误
    get context 得到 ["WEBVIEW_com.tencent.mm:appbrand0","WEBVIEW_com.tencent.mm:tools","WEBVIEW_com.tencent.mm:support","WEBVIEW_com.tencent.mm:appbrand1","WEBVIEW_com.android.quicksearchbox"]
    日志打印的 chromeOptions
    {"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"androidProcess":"com.tencent.mm:tools","androidDeviceSerial":"ZPRWJREMM4NBL7"}}}
    最后切换的时候总是报错 Device ZPRWJREMM4NBL7 is not online\n
    info: JSONWP Proxy: Got response with status 200: {"sessionId":"bd50308685a46e4c369e386f881e9ab0","status":13,"value":{"message":"unknown error: Device ZPRWJREMM4NBL7 is not online\n (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.3...
    请问有没有什么好的解决方法,一直卡在着!

  • @mikezhou hi,我想问下,我按照你 Python+AppiumLibrary+RobotFramework 的方法,最先是我的 chrome 和 chromedriver 版本不一致导致切换 context 有问题,现在我已经把手机的 chrome 和 chromedriver 版本弄一致。
    get context 得到 ["WEBVIEW_com.tencent.mm:appbrand0","WEBVIEW_com.tencent.mm:tools","WEBVIEW_com.tencent.mm:support","WEBVIEW_com.tencent.mm:appbrand1","WEBVIEW_com.android.quicksearchbox"]
    日志打印的 chromeOptions
    {"chromeOptions":{"androidPackage":"com.tencent.mm","androidUseRunningApp":true,"androidProcess":"com.tencent.mm:tools","androidDeviceSerial":"ZPRWJREMM4NBL7"}}}
    最后切换的时候总是报错 Device ZPRWJREMM4NBL7 is not online\n
    info: JSONWP Proxy: Got response with status 200: {"sessionId":"bd50308685a46e4c369e386f881e9ab0","status":13,"value":{"message":"unknown error: Device ZPRWJREMM4NBL7 is not online\n (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.3...
    请问有没有什么好的解决方法,一直卡在着!