簡體   English   中英

無法解析依賴項 - webdriverIO

[英]Unable to resolve dependencies - webdriverIO

我正在嘗試使用 ( npm run test-local ) 運行我的 WebdriverIo 規范,即使我在 package.json 中擁有所有依賴項,我也會收到以下錯誤,如下所述

[0-2] 錯誤:無法創建會話。 錯誤轉發新會話 Empty pool of VM for setup Capabilities {browserName: chrome, goog:chromeOptions: {}}*

npm WARN grunt-webdriver@3.0.0 需要@wdio/cli@^5.1.0 的同級,但沒有安裝。 您必須自己安裝對等依賴項。 npm WARN grunt-webdriver@3.0.0 需要 webdriverio@^5.1.0 的同級,但沒有安裝。 您必須自己安裝對等依賴項。 npm WARN wdio-chromedriver-service@6.0.4 需要 chromedriver@ 的同級,但沒有安裝。 您必須自己安裝對等依賴項 *


"scripts": {
    "allure:history": "mkdir -p allure-report/history ./test/reports/allure-results/history && cp -a allure-report/history ./test/reports/allure-results/",
    "allure-report": "node_modules/.bin/allure generate --clean ./test/reports/allure-results && allure open",
    "junit-report": "node_modules/.bin/junit-viewer --results=./test/reports/junit-results --save=junit-results.html && open junit-results.html",
    "test-sauce": "wdio ./test/config/wdio.sauce.conf.js",
    "test-browserstack": "wdio ./test/config/wdio.browserstack.conf.js",
    "test-local": "npm run allure:history && wdio ./test/config/wdio.local.conf.js",
    "test-mobile": "wdio ./test/config/wdio.appium.conf.js"
  },
"dependencies": {},
  "devDependencies": {
    "@babel/cli": "^7.8.4",
    "@babel/core": "^7.9.0",
    "@babel/plugin-syntax-export-default-from": "^7.8.3",
    "@babel/preset-env": "^7.9.0",
    "@babel/register": "^7.9.0",
    "@wdio/allure-reporter": "^6.4.7",
    "@wdio/appium-service": "^6.4.7",
    "@wdio/browserstack-service": "^6.4.7",
    "@wdio/cli": "^6.0.5",
    "@wdio/junit-reporter": "^6.4.7",
    "@wdio/local-runner": "^6.0.5",
    "@wdio/mocha-framework": "^6.4.7",
    "@wdio/sauce-service": "^6.0.4",
    "@wdio/selenium-standalone-service": "^6.1.4",
    "@wdio/spec-reporter": "^6.0.4",
    "@wdio/sync": "^6.0.1",
    "allure-commandline": "^2.13.0",
    "babel-plugin-source-map-support": "^2.1.3",
    "eslint": "^7.2.0",
    "eslint-config-standard": "^14.1.1",
    "eslint-plugin-import": "^2.20.2",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-standard": "^4.0.1",
    "grunt": "^1.3.0",
    "grunt-cli": "^1.3.2",
    "grunt-mocha": "^1.2.0",
    "grunt-webdriver": "^3.0.0",
    "junit-viewer": "^4.11.1",
    "node-excel-to-json": "0.0.3",
    "selenium-standalone": "^6.20.0",
    "underscore": "^1.11.0",
    "wdio-chromedriver-service": "^6.0.2",
    "wdio-json-reporter": "^2.0.0"
  }

確保 selenium 獨立服務器已啟動並正在運行

java -jar selenium-server-standalone-3.141.59.jar -role node -hub http://localhost:4444/grid/register -browser "browserName=chrome,maxinstance=1

上面的命令對我有用!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM