【发布时间】:2020-02-28 02:37:27
【问题描述】:
我正在尝试让 firefox 在 webdriver.io 5 中运行。这是在 Linux 云上。
我明白了:
2020-02-28T02:32:33.472Z INFO @wdio/cli:launcher: Run onPrepare hook
2020-02-28T02:32:33.475Z INFO @wdio/local-runner: Start worker 0-0 with arg: wdio.conf.js
[0-0] 2020-02-28T02:32:33.818Z INFO @wdio/local-runner: Run worker command: run
[0-0] RUNNING in firefox - /build/main.js
[0-0] 2020-02-28T02:32:33.881Z INFO webdriverio: Initiate new session using the webdriver protocol
[0-0] 2020-02-28T02:32:33.883Z INFO webdriver: [POST] http://127.0.0.1:4444/session
[0-0] 2020-02-28T02:32:33.883Z INFO webdriver: DATA {
capabilities: {
alwaysMatch: { browserName: 'firefox', 'moz:firefoxOptions': [Object] },
firstMatch: [ {} ]
},
desiredCapabilities: { browserName: 'firefox', 'moz:firefoxOptions': { args: [Array] } }
}
[0-0] 2020-02-28T02:32:33.899Z WARN webdriver: Request failed due to connect ECONNREFUSED 127.0.0.1:4444
[0-0] 2020-02-28T02:32:33.899Z INFO webdriver: Retrying 1/3
这是我的配置:
exports.config = {
runner: 'local',
path: '/',
specs: [
'./build/**/*.js'
],
maxInstances: 10,
capabilities: [
{
"browserName": "firefox",
"moz:firefoxOptions": {
"args": ["-headless"],
}
}
],
logLevel: 'info',
bail: 0,
baseUrl: 'http://localhost',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
reporters: ['spec'],
framework: 'mocha',
mochaOpts: {
ui: 'bdd',
timeout: 60000
},
services: [
],
}```
Any ideas what I am doing wrong?
【问题讨论】:
-
你是在使用 selenium 服务器还是你是如何触发 gecko 驱动的?
-
如果我使用无头 Firefox 是否需要 selenium?
-
这是您可以做出的选择。请参阅可用的样板。
标签: selenium testing selenium-webdriver webdriver webdriver-io