当我运行为移动网站(Angular)编写的量角器脚本时,Chrome浏览器和模拟器都自动关闭

贾加迪什

我使用量角器和appium开始了移动网站自动化,因此,当我运行脚本时,chrome和模拟器会自动关闭,同时将URL [browser.get(“ https://www.purplle.com ”)“)传递给chrome正在发生。请帮我解决这个问题。

Conf.js:

exports.config = { 
  seleniumAddress: 'http://localhost:4723/wd/hub',
  capabilities: {
    'browserName': 'chrome',
    'appium-version' : '1.8.1',
    'platformName' : 'Android',
    'platformVersion' : '6',
    'deviceName' : '192.168.56.101:5555',
     waitforTimeout: 30000,
     commandTimeout: 30000
},

baseUrl: 'http://localhost:8000',


specs: ['First.js'],

 framework: 'jasmine',
  jasmineNodeOpts: {
defaultTimeoutInterval: 30000,
  }

};

First.js:

describe('angularjs homepage', function() {


 it('should greet the named user', function() {
browser.ignoreSynchronization = true;
browser.get('https://www.purplle.com');
Thread.sleep(2000);
  });
});

NPM:3.10.10
节点:6.14.2
量角器:5.4.1
Appia:1.8.1

这是adb设备的屏幕截图

鸦皮日志:

[Appium] Appium support for versions of node < 8 has been deprecated and will be removed in a future version. Please upgrade!
[Appium] Welcome to Appium v1.8.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"browserName":"chrome","appium-version":"1.8.1","platformName":"Android","platformVersion":"6.0","deviceName":"192.168.56.101:5555","waitforTimeout":30000,"commandTimeout":30000,"count":1}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"chrome","appium-version":"1.8.1","platformName":"Android","platformVersion":"6.0","deviceName":"192.168.56.101:5555","waitforTimeout":30000,"commandTimeout":30000,"count":1},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1538656361017 (18:02:41 GMT+0530 (IST))
[Appium] Consider setting 'automationName' capability to 'uiautomator2' on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.
[Appium] Creating new AndroidDriver (v2.7.0) session
[Appium] Capabilities:
[Appium]   browserName: chrome
[Appium]   appium-version: 1.8.1
[Appium]   platformName: Android
[Appium]   platformVersion: 6.0
[Appium]   deviceName: 192.168.56.101:5555
[Appium]   waitforTimeout: 30000
[Appium]   commandTimeout: 30000
[Appium]   count: 1
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {"browserName":"chrome","ap...
[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium-version, waitforTimeout, commandTimeout, count.
[BaseDriver] Session created with session id: 3fda2699-ba75-4025-ae77-5f5d974e8052
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_181
[AndroidDriver] We're going to run a Chrome-based session
[AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main
[ADB] Checking whether adb is present
[ADB] Found 4 'build-tools' folders under '/home/jagadeesh/android-sdk-linux' (newest first):
[ADB]     /home/jagadeesh/android-sdk-linux/build-tools/28.0.0
[ADB]     /home/jagadeesh/android-sdk-linux/build-tools/27.0.3
[ADB]     /home/jagadeesh/android-sdk-linux/build-tools/26.0.0
[ADB]     /home/jagadeesh/android-sdk-linux/build-tools/23.0.1
[ADB] Using adb from /home/jagadeesh/android-sdk-linux/platform-tools/adb
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Looking for a device with Android '6.0'
[debug] [ADB] Setting device id to 192.168.56.101:5555
[ADB] Getting device platform version
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 6.0
[AndroidDriver] Using device: 192.168.56.101:5555
[debug] [ADB] Setting device id to 192.168.56.101:5555
[AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
[debug] [AndroidDriver] Checking whether package is present on the device
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm list packages com.android.chrome'
[AndroidDriver] Starting Android session
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 wait-for-device'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm list packages io.appium.settings'
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell dumpsys package io.appium.settings'
[ADB] Checking whether aapt is present
[ADB] Using aapt from /home/jagadeesh/android-sdk-linux/build-tools/28.0.0/aapt
[debug] [ADB] The installed 'io.appium.settings' package does not require upgrade ('2.3.0' >= '2.3.0')
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell ps'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 23
[debug] [ADB] Device API level: 23
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [ADB] Device API level: 23
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell appops set io.appium.settings android\:mock_location allow'
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'null' and country: 'null'
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Getting install status for io.appium.unlock
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm list packages io.appium.unlock'
[debug] [ADB] App is installed
[debug] [ADB] Getting package info for 'io.appium.unlock'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell dumpsys package io.appium.unlock'
[debug] [ADB] The installed 'io.appium.unlock' package does not require upgrade ('2.0.0' >= '2.0.0')
[ADB] Getting device platform version
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 6.0
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell wm size'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.product.model'
[debug] [ADB] Current device property 'ro.product.model': Google
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell getprop ro.product.manufacturer'
[debug] [ADB] Current device property 'ro.product.manufacturer': Genymotion
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [AndroidDriver] No app capability. Assuming it is already on the device
[debug] [ADB] Getting install status for com.android.chrome
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm list packages com.android.chrome'
[debug] [ADB] App is installed
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell am force-stop com.android.chrome'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell pm clear com.android.chrome'
[debug] [AndroidDriver] Performed fast reset on the installed 'com.android.chrome' application (stop and clear)
[debug] [AndroidBootstrap] Watching for bootstrap disconnect
[debug] [ADB] Forwarding system: 4724 to device: 4724
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 forward tcp\:4724 tcp\:4724'
[debug] [UiAutomator] Starting UiAutomator
[debug] [UiAutomator] Moving to state 'starting'
[debug] [UiAutomator] Parsing uiautomator jar
[debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 push /usr/lib/node_modules/appium/node_modules/appium-android-bootstrap/bootstrap/bin/AppiumBootstrap.jar /data/local/tmp/'
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell ps'
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Starting UIAutomator
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","192.168.56.101:5555","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.android.chrome","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[debug] [UiAutomator] Moving to state 'online'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] Android bootstrap socket is now connected
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell dumpsys window'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[AndroidDriver] Starting a chrome-based browser session
[debug] [AndroidDriver] A port was not given, using random port: 8000
[debug] [Chromedriver] Changed state to 'starting'
[debug] [Chromedriver] The following Chromedriver executables were found:
[debug] [Chromedriver]     /usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 (minimum Chrome version '65.0.3325')
[debug] [ADB] Getting package info for 'com.android.chrome'
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell dumpsys package com.android.chrome'
[debug] [Chromedriver] Found Chrome bundle 'com.android.chrome' version '69.0.3497'
[debug] [Chromedriver] Found 1 Chromedriver executable capable of automating Chrome '69.0.3497'.
[debug] [Chromedriver] Choosing the most recent, '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64'.
[debug] [Chromedriver] If a specific version is required, specify it with the `chromedriverExecutable`desired capability.
[Chromedriver] Set chromedriver binary as: /usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64
[debug] [Chromedriver] Killing any old chromedrivers, running: pkill -15 -f "/usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64.*--port=8000"
[Chromedriver] No old chromedrivers seemed to exist
[debug] [Chromedriver] Cleaning any old adb forwarded port socket connections
[debug] [ADB] List forwarding ports
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 forward --list'
[Chromedriver] Spawning chromedriver with: /usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_64 --url-base=wd/hub --port=8000 --adb-port=5037 --verbose
[debug] [Chromedriver] Chromedriver version: '2.38.552522'
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8000/wd/hub/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Linux\",\"version\":\"4.15.0-34-generic\"}}}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"192.168.56.101:5555"}}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"5fe56d93525866425feed6dff4f0e8a0","status":100,"value":{"message":"chrome not reachable\n  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64)"}}
[Chromedriver] Error: Failed to start Chromedriver session: An error occurred (Original error: chrome not reachable
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"192.168.56.101:5555"}}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"593b4f1c71de1e1a2ea525266575ea20","status":13,"value":{"message":"unknown error: com.android.chrome is not installed on device 192.168.56.101:5555\n  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64)"}}
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"192.168.56.101:5555"}}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"2051889893a66c52130ae6bc4afb303e","status":13,"value":{"message":"unknown error: com.android.chrome is not installed on device 192.168.56.101:5555\n  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64)"}}
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome","androidDeviceSerial":"192.168.56.101:5555"}}}
[debug] [JSONWP Proxy] Got response with status 200: {"sessionId":"b8e7948c8df0faea272842f18e8ef562","status":13,"value":{"message":"unknown error: com.android.chrome is not installed on device 192.168.56.101:5555\n  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64)"}}
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[Chromedriver] Chromedriver exited unexpectedly with code null, signal SIGTERM
[debug] [Chromedriver] Changed state to 'stopped'
[Chromedriver] Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[Chromedriver]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[Chromedriver]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[Chromedriver]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[Chromedriver]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[Chromedriver]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [AndroidDriver] Shutting down Android driver
[debug] [ADB] Pressing the HOME button
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell input keyevent 3'
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"shutdown"}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state 'stopping'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Time: 66.336
[debug] [AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1
[debug] [UiAutomator] UiAutomator shut down normally
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell ps'
[ADB] No uiautomator process found to kill, continuing...
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Running '/home/jagadeesh/android-sdk-linux/platform-tools/adb -P 5037 -s 192.168.56.101\:5555 shell am force-stop io.appium.unlock'
[debug] [AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1538656434268 (18:03:54 GMT+0530 (IST))
[MJSONWP] Encountered internal error running command: Error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
[MJSONWP]   (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[MJSONWP]     at Object.wrappedLogger.errorAndThrow (/usr/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[MJSONWP]     at Chromedriver.callee$2$0$ (/usr/lib/node_modules/appium/node_modules/appium-chromedriver/lib/chromedriver.js:411:13)
[MJSONWP]     at tryCatch (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[MJSONWP]     at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[MJSONWP]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[MJSONWP]     at GeneratorFunctionPrototype.invoke (/usr/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 73263 ms - 467
[HTTP] 

当我运行“量角器conf.js”时,下面的日志是:

protractor conf.js 
[18:02:40] I/launcher - Running 1 instances of WebDriver
[18:02:40] I/hosted - Using the selenium server at http://localhost:4723/wd/hub
[18:03:54] E/launcher - An unknown server-side error occurred while processing the command. Original error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
[18:03:54] E/launcher - WebDriverError: An unknown server-side error occurred while processing the command. Original error: Failed to start Chromedriver session: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.chrome is not installed on device 192.168.56.101:5555
  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.15.0-34-generic x86_64))
    at WebDriverError (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)
    at Object.checkLegacyResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15)
    at parseHttpResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30)
    at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
    at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:761:15)
    at createDriver (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:170:33)
    at Builder.build (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:626:16)
    at Hosted.getNewDriver (/usr/lib/node_modules/protractor/built/driverProviders/driverProvider.js:53:33)
    at Runner.createBrowser (/usr/lib/node_modules/protractor/built/runner.js:195:43)
    at q.then.then (/usr/lib/node_modules/protractor/built/runner.js:339:29)
    at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/usr/lib/node_modules/protractor/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[18:03:54] E/launcher - Process exited with error code 199

阿米特·贾恩(Amit Jain)

仔细检查以下功能,

'deviceName' : '192.168.56.101:5555'

ip不能是设备名称,请按照以下命令运行以获取设备名称adb devices如果您在wifi上运行真实设备,则ip可以是设备名称。由于您已经编写了模拟器,因此不可能出现这种情况。deviceName可以像emulator-5554

'platformVersion' : '6'

设备平台版本应该是为其创建模拟器的确切版本,例如 6.0.1

有关更多信息,请共享服务器日志,可能存在问题,例如模拟器中的chrome浏览器版本与您通过量角器使用的chromedriver.exe不兼容。等等

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

无法为“angular 4 applicaiton”运行“在 Firefox 浏览器中的量角器测试脚本”

量角器“在等待量角器与页面同步时出错”浏览Angular网站

量角器+ CucumberJS + Gulp量角器=测试失败时浏览器不会关闭

量角器浏览器Chrome缓存问题

量角器无法运行我的脚本

量角器/硒:在后台运行浏览器

使图像响应移动网站/浏览器

量角器开始测试时,Chrome浏览器未显示

在 Google 新闻网站中打开链接时的移动 Chrome 浏览器行为

Javascript / HTML移动浏览器模拟器

每次我访问网站时都强制Google Chrome浏览器检查新的JavaScript文件

我可以在Worklight Server上安装Worklight移动浏览器模拟器吗?

当我点击任何链接时,Chrome浏览器标签会关闭

用于在Ubuntu / Linux上进行移动浏览器测试的模拟器/模拟器

如何在浏览器和移动模拟器之间获取Meteor实时更新?

在方法/函数中运行chromedriver时,Chrome浏览器会自动关闭

webdriverIO和iOS模拟器浏览器测试

当我构建 APK 在移动设备中无法运行的 APK 时,在模拟器应用程序中完美运行

Ionic V3请求在Chrome浏览器和模拟器中随机失败

当我最大化浏览器时,如何通过脚本自动隐藏启动器?

仅当我在Chrome上缓存刷新时,网站才能完全正常运行,在其他浏览器上也可以正常运行

如何在我的 Angular 9 Web 应用程序的量角器 e2e 测试中允许 chrome 浏览器通知

在有无浏览器的情况下运行Karma和量角器测试

当我的测试失败并且在chrome浏览器关闭之前,如何截屏chrome浏览器(@After)

尝试运行量角器测试时,Chrome自动化扩展程序已崩溃

运行用户脚本时setInterval使我的浏览器崩溃?

量角器无法使用 Safari 单击,而相同的脚本在 Chrome 和 Firefox 中运行良好

使用Type Script和VS Code调试量角器时浏览器不同步

从量角器访问窗口对象/浏览器范围