在模拟器浏览器中使用appium运行量角器脚本时会崩溃

时间:2016-03-18 19:14:20

标签: android angularjs android-emulator protractor appium

当我在Android模拟器中使用appium运行量角器脚本时,浏览器会崩溃 这是我的代码和Appium日志:

  • Appium版本为1.4.16.1
  • Android版本的模拟器为5.0.1 API 21.

    exports.config = {
    seleniumAddress: 'http://localhost:4733/wd/hub',
    specs: ['todo-spec.js'],
    
     // Capabilities to be passed to the webdriver instance.
    capabilities: {
    
       browserName: 'Browser',
      'appium-version': '1.4.16.1',
       platformName: 'Android',
      'app': 'Browser',
       platformVersion: '5.0.1',
       deviceName: 'AndroidDevice',
       device: 'android'
    },
    
    // Framework to use. Jasmine is recommended.
    framework: 'jasmine',
    
    // Spec patterns are relative to the current working directly when
    // protractor is called.
    baseUrl: 'http://127.0.0.1:9515',
    
    
    // Options to be passed to Jasmine.
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 1000,
        isVerbose : true,
        includeStackTrace : true
    }
    

    };

我的appium日志文件是:

>     at C:\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:100:28
>     at flush (C:\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 operation did not complete before its timeout expired. (Original error: timeout: Adb command timed out after 30 seconds
>   (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64))]
>   status: 21,
>   value: { message: 'timeout: Adb command timed out after 30 seconds\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64)' },
>   httpCode: 200 }
> error: Failed to start an Appium session, err was: Error: An operation did not complete before its timeout expired. (Original error: timeout: Adb command timed out after 30 seconds
>   (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64))
> info: [debug] Cleaning up appium session
> info: [debug] Error: An operation did not complete before its timeout expired. (Original error: timeout: Adb command timed out after 30 seconds
>   (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64))
>     at JWProxy.command$ (lib/proxy.js:133:15)
>     at tryCatch (C:\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] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:315:22)
>     at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-chromedriver\node_modules\appium-jsonwp-proxy\node_modules\babel-runtime\regenerator\runtime.js:100:21)
>     at GeneratorFunctionPrototype.invoke (C:\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 (C:\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 C:\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:100:28
>     at flush (C:\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)
> info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: An operation did not complete before its timeout expired. (Original error: timeout: Adb command timed out after 30 seconds\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64)))","status":21,"value":{"message":"timeout: Adb command timed out after 30 seconds\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64)"},"httpCode":200,"origValue":"An operation did not complete before its timeout expired. (Original error: timeout: Adb command timed out after 30 seconds\n  (Driver info: chromedriver=2.18.343845 (73dd713ba7fbfb73cbb514e62641d8c96a94682a),platform=Windows NT 10.0 x86_64))"},"sessionId":null}
> info: <-- POST /wd/hub/session 500 208779.774 ms - 819 
> 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] Sent shutdown command, waiting for UiAutomator to stop...
> 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: 197.392
> info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
> info: [debug] UiAutomator shut down normally
> info: [debug] executing cmd: "C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe" -s emulator-5554 shell "am force-stop com.android.browser"
> info: [debug] Stopping logcat capture
> info: [debug] Logcat terminated with code null, signal SIGTERM
> info: [debug] Cleaning up appium session

0 个答案:

没有答案