cookbook 'selenium_grid', '= 1.2.0'
selenium_grid (6) Versions 1.2.0 Follow4
Installs/Configures Selenium-Grid
cookbook 'selenium_grid', '= 1.2.0', :supermarket
knife supermarket install selenium_grid
knife supermarket download selenium_grid
Selenium-Grid Cookbook
Wraps selenium, browsers, drivers, and screenresolution cookbooks into one comprehensive cookbook.
Supports
- Chrome
- Firefox
- HtmlUnit
- Internet Explorer
- Opera
- PhantomJS
- Safari
Requirements
- Java (not installed by this cookbook)
- Chef 11.16+
Platforms
- CentOS, RedHat
- Mac OS X
- Ubuntu
- Windows
Recipes
hub
Installs and configures a Selenium Hub as a service. See selenium
hub
recipe attributes for more information about configuring the hub.
node
Installs and configures a Selenium Node as service on Linux and a GUI service on Mac OS X and 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.
Attributes
-
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 Firefox, 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']['opera']['max_instances']
- Installs Opera and OperaDriver, if > 0. Ubuntu and Windows only. Default0
. -
node['selenium_grid']['opera']['version']
- Version of browser installed, if nil. Defaultnil
. -
node['selenium_grid']['phantomjs']['max_instances']
- Installs GhostDriver and PhantomJS, and creates a separate Node service for each instance, if > 0. Linux only. Default0
. -
node['selenium_grid']['safari']['max_instances']
- Installs SafariDriver via Safari, if > 0. Mac OS X only. Default0
. -
node['selenium_grid']['safari']['version']
- Version of browser installed, if nil. Defaultnil
.
Account
-
node['selenium_grid']['username']
- Mac OS X and Windows. Defaultnil
. -
node['selenium_grid']['password']
- Mac OS X and Windows. Defaultnil
. -
node['selenium_grid']['domain']
- Windows only. Defaultnil
.
Display
-
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
.
Examples
Role to create Selenium Node with Chrome and Firefox capabilities
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]" )
Selenium Node with IE capability and custom version
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::node'
Getting Help
- Ask specific questions on Stack Overflow.
- Report bugs and discuss potential features in Github issues.
Contributing
Please refer to CONTRIBUTING.
License
MIT - see the accompanying LICENSE file for details.
Dependent cookbooks
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Changelog
1.2.0
- Support Opera
1.1.0
- Support PhantomJS
1.0.0
- Initial release
Foodcritic Metric
1.2.0 passed this metric
1.2.0 passed this metric