webdriverIO和ucelab集成无法正常工作

问题描述

当我尝试将webdriverIO与酱汁实验室连接时,出现错误消息

我正在使用酱汁服​​务

$ ./node_modules/.bin/wdio ./config/int.wdio.conf.js

Execution of 1 spec files started at 2020-08-30T20:11:14.720Z

2020-08-30T20:11:14.768Z INFO @wdio/cli:launcher: Run onPrepare hook
2020-08-30T20:11:14.770Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2020-08-30T20:11:14.772Z INFO @wdio/local-runner: Start worker 0-0 with arg: ./config/int.wdio.conf.js
[0-0] 2020-08-30T20:11:15.414Z INFO @wdio/local-runner: Run worker command: run
[0-0] 2020-08-30T20:11:15.422Z INFO webdriverio: Initiate new session using the ./protocol-stub protocol
[0-0] RUNNING in chrome - /e2e/test/login.int.spec.js
[0-0] 2020-08-30T20:11:15.704Z INFO webdriverio: Initiate new session using the webdriver protocol
[0-0] 2020-08-30T20:11:15.706Z INFO webdriver: [POST] https://ondemand.saucelabs.com/wd/hub/session
[0-0] 2020-08-30T20:11:15.706Z INFO webdriver: DATA {
  capabilities: {
    alwaysMatch: { browserName: 'chrome',acceptInsecureCerts: true },firstMatch: [ {} ]
  },desiredCapabilities: { browserName: 'chrome',acceptInsecureCerts: true }
}
[0-0] 2020-08-30T20:11:15.733Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:443
    at ClientRequest.<anonymous> (/node_modules/got/dist/source/core/index.js:891:25)
    at Object.onceWrapper (events.js:418:26)
    at ClientRequest.emit (events.js:323:22)
    at ClientRequest.EventEmitter.emit (domain.js:482:12)
    at ClientRequest.origin.emit (/test/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)
    at TLSSocket.socketErrorListener (_http_client.js:426:9)
    at TLSSocket.emit (events.js:311:20)
    at TLSSocket.EventEmitter.emit (domain.js:482:12)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
[0-0] 2020-08-30T20:11:15.733Z ERROR @wdio/runner: Error: Failed to create session.
Unable to connect to "https://ondemand.saucelabs.com:443/wd/hub",make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
    at startWebDriverSession (/test/node_modules/webdriver/build/utils.js:45:11)
    at processticksAndRejections (internal/process/task_queues.js:97:5)
[0-0]  Error:  Failed to create session.
Unable to connect to "https://ondemand.saucelabs.com:443/wd/hub",make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
[0-0] Failed in chrome - /e2e/test/login.int.spec.js
2020-08-30T20:11:15.848Z INFO @wdio/cli:launcher: Run onComplete hook

Spec Files:  0 passed,1 Failed,1 total (100% completed) in 00:00:01 

2020-08-30T20:11:15.849Z INFO @wdio/local-runner: Shutting down spawned worker
2020-08-30T20:11:16.102Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2020-08-30T20:11:16.102Z INFO @wdio/local-runner: shutting down
error Command Failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

我的wdio.config.js看起来像

exports.config = {
    runner: 'local',user: 'test123',key: '65434d10-276f-4305-adb4-93a39848d445',region: 'us',specs: [
        './e2e/test/*.int.spec.js'
    ],exclude: [
        './e2e/test/*.prod.spec.js','./e2e/test/*.ie.int.spec.js'
    ],maxInstances: 1,capabilities: [
        {
            maxInstances: 1,browserName: 'chrome',acceptInsecureCerts: true
        }
    ],logLevel: 'info',bail: 0,baseUrl: 'https://www.google.com',waitforTimeout: 10000,connectionRetryTimeout: 120000,connectionRetryCount: 3,services: ['sauce'],framework: 'mocha',reporters: ['mochawesome'],mochaOpts: {
        ui: 'bdd',timeout: 60000
    }
}

任何想法如何解决此问题...

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)