Firefox 不会忽略黄瓜功能
Firefox not ignoring cucumber feature
我在 firefox 中遇到了很多问题 运行ning Gherkin 场景。
示例运行在Chrome.
中完美
我的能力wdio.conf.js
capabilities: [{
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
// grid with only 5 firefox instance available you can make sure that not more than
// 5 instance gets started at a time.
maxInstances: 5,
//
browserName: 'firefox',
path: '/usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/3.0.0-beta3-server.jar'
}],
我也在使用 firefox-profile 和 selenium-standalone 服务器(wdio.conf.js 中的服务)
services: ['selenium-standalone', 'firefox-profile'],
firefoxProfile: {
// extensions: ['/path/to/extensionA.xpi', '/path/to/extensionB.xpi'],
'browser.startup.homepage': 'http://google.com',
'plugin.state.npctrl': '2',
'plugin.state.silverlight': '2'
}
设置:
- webdriverio: 4.2.16
- wdio-黄瓜框架:0.2.5
- wdio-firefox-配置文件服务:0.0.1
- wdio-selenium-独立服务:0.0.7
- 黄瓜(js):1.2.0
- 硒服务器:3.0.0-beta3
- 火狐:49.0.1
- 壁虎驱动程序:0.10.0
Firefox 打开并导航到 google.com 但它没有 运行 测试,我得到以下输出:
=======================================================================================
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs.
For a complete list of commands, visit http://webdriver.io/api.html.
=======================================================================================
[18:09:10] COMMAND POST "/wd/hub/session"
[18:09:10] DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"maxInstances":5,"browserName":"firefox","path":"/usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/3.0.0-beta3-server.jar","firefox_profile":"[base64] 1236 bytes","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.2.16","name":"webdriverio"}}}
0 passing (48.90s)
在 Chrome 中,相同的设置得到(预期的)以下输出:
=======================================================================================
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs.
For a complete list of commands, visit http://webdriver.io/api.html.
=======================================================================================
[18:13:49] COMMAND POST "/wd/hub/session"
[18:13:49] DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"maxInstances":5,"browserName":"chrome","path":"/usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/3.0.0-beta3-server.jar","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.2.16","name":"webdriverio"}}}
(...)
6 passing (14.40s)
这可能是版本兼容性问题,降级到selenium server 2.53.1和firefox到43.0可以运行完美
我在 firefox 中遇到了很多问题 运行ning Gherkin 场景。 示例运行在Chrome.
中完美我的能力wdio.conf.js
capabilities: [{
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
// grid with only 5 firefox instance available you can make sure that not more than
// 5 instance gets started at a time.
maxInstances: 5,
//
browserName: 'firefox',
path: '/usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/3.0.0-beta3-server.jar'
}],
我也在使用 firefox-profile 和 selenium-standalone 服务器(wdio.conf.js 中的服务)
services: ['selenium-standalone', 'firefox-profile'],
firefoxProfile: {
// extensions: ['/path/to/extensionA.xpi', '/path/to/extensionB.xpi'],
'browser.startup.homepage': 'http://google.com',
'plugin.state.npctrl': '2',
'plugin.state.silverlight': '2'
}
设置:
- webdriverio: 4.2.16
- wdio-黄瓜框架:0.2.5
- wdio-firefox-配置文件服务:0.0.1
- wdio-selenium-独立服务:0.0.7
- 黄瓜(js):1.2.0
- 硒服务器:3.0.0-beta3
- 火狐:49.0.1
- 壁虎驱动程序:0.10.0
Firefox 打开并导航到 google.com 但它没有 运行 测试,我得到以下输出:
=======================================================================================
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs.
For a complete list of commands, visit http://webdriver.io/api.html.
=======================================================================================
[18:09:10] COMMAND POST "/wd/hub/session"
[18:09:10] DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"maxInstances":5,"browserName":"firefox","path":"/usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/3.0.0-beta3-server.jar","firefox_profile":"[base64] 1236 bytes","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.2.16","name":"webdriverio"}}}
0 passing (48.90s)
在 Chrome 中,相同的设置得到(预期的)以下输出:
=======================================================================================
Selenium 2.0 / webdriver protocol bindings implementation with helper commands in nodejs.
For a complete list of commands, visit http://webdriver.io/api.html.
=======================================================================================
[18:13:49] COMMAND POST "/wd/hub/session"
[18:13:49] DATA {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"maxInstances":5,"browserName":"chrome","path":"/usr/local/lib/node_modules/selenium-standalone/.selenium/selenium-server/3.0.0-beta3-server.jar","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.2.16","name":"webdriverio"}}}
(...)
6 passing (14.40s)
这可能是版本兼容性问题,降级到selenium server 2.53.1和firefox到43.0可以运行完美