This cookbook installs and configures PhantomJS GhostDriver (https://github.com/detro/ghostdriver) as a standalone server or selenium-grid node. PhantomJS is set to v1.9.8 in this cookbook.
- Chef 11.6.0 (includes a built-in registry_key resource) or higher
- CentOS, RedHat
- Ubuntu
- Windows
- phantomjs
These cookbooks are referenced with suggests, so be sure to depend on cookbooks that apply:
- windows
- nssm - Required for Windows services only
See ghostdriver_test cookbook for working examples.
ghostdriver 'ghostdriver_standalone' do
action :install
end
ghostdriver 'ghostdriver_seleniumnode' do
webdriverSeleniumGridHub "http://#{node['ipaddress']}:4444/grid/register/"
action :install
end
servicename
- Service name. Defaults to the name of the resource block.webdriver
- Webdriver ip:port. Defaults to#{node['ipaddress']}:8910
.webdriverSeleniumGridHub
- URL of selenium hub. Defaults tonil
.
This cookbook includes custom ChefSpec matchers you can use to test your own cookbooks.
Example Matcher Usage
expect(chef_run).to install_ghostdriver('ghostdriver_seleniumnode').with(
webdriverSeleniumGridHub: "http://#{node['ipaddress']}:4444/grid/register/"
)
Cookbook Matchers
- install_ghostdriver(resource_name)
- 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.