Setup a selenium grid in minutes. Create selenium hub, then add selenium nodes on Linux, Mac OS X and/or Windows platforms. Set max instances greater than zero to install and/or configure Browsers and JavaScript engines. Browsers and JavaScript engines will be ignored on operating systems that are not compatible.
Supported Browser and JavaScript engines:
- Chrome
- Firefox
- HtmlUnit
- Internet Explorer
- Java (not installed by this cookbook)
- Chef 12.14+
- CentOS, RedHat
- Debian, Ubuntu
- Windows
Installs and configures a Selenium Hub as a service. See selenium hub recipe attributes for more information about configuring the hub.
Installs and configures a Selenium Node as service on Linux and a GUI service on Windows. See selenium node recipe attributes for more information about configuring the node. The following attributes are in addition to the node attributes. See associated browsers and drivers cookbook attributes (if any) for more information about configuring them as well.
node['selenium_grid']['chrome']['max_instances']
- Installs Chrome and ChromeDriver, if > 0. Default0
.node['selenium_grid']['chrome']['version']
- Version of browser installed, if nil. Defaultnil
.node['selenium_grid']['firefox']['max_instances']
- Installs MozillaFirefox, if > 0. Default0
.node['selenium_grid']['firefox']['version']
- Version of browser installed, if nil. Defaultnil
.node['selenium_grid']['htmlunit']['max_instances']
- Activates HtmlUnit, if > 0. Default0
.node['selenium_grid']['htmlunit']['version']
- Defaultnil
.node['selenium_grid']['ie']['max_instances']
- Installs IEDriver and configures IE, if > 0. Only one instance of IE is recommended. Windows only. Default0
.node['selenium_grid']['ie']['version']
- Version of browser installed, if nil. Defaultnil
.
node['selenium_grid']['username']
- Windows only. Defaultnil
.node['selenium_grid']['password']
- Windows only. Defaultnil
.node['selenium_grid']['domain']
- Windows only. Defaultnil
.
node['selenium_grid']['display']['width']
- Linux and Windows only. Default1024
.node['selenium_grid']['display']['height']
- Linux and Window only. Default768
.node['selenium_grid']['display']['depth']
- Linux only. Default24
.node['selenium_grid']['display']['windows']
- Windows only. Defaulttrue
.
name "selenium_node"
description "Install Selenium Node with Chrome and Firefox capabilities"
default_attributes(
"selenium_grid": {
"chrome": {
"max_instances": 5
},
"firefox": {
"max_instances": 5
}
}
)
run_list(
"recipe[selenium_grid::node]"
)
v = ie_version.split('.')
major_version = v[0]
minor_version = v[1]
node.set['selenium_grid']['ie']['max_instances'] = 1
node.set['selenium_grid']['ie']['version'] = "#{major_version}.#{minor_version}"
include_recipe 'selenium_grid::node'
- Ask specific questions on Stack Overflow.
- Report bugs and discuss potential features in Github issues.
Please refer to CONTRIBUTING.
MIT - see the accompanying LICENSE file for details.