CapybaraSelenium
Dead-simple way to make Capybara and Selenium play together
Roadmap
CapybaraSelenium is on its way towards 1.0.0. Please refer to issues for details.
Installation
Add this line to your application's Gemfile:
gem 'capybara-selenium'
And then execute:
$ bundle
Or install it yourself as:
$ gem install -selenium
Usage
Supported application servers:
- Modular sinatra apps (through config.ru)
Supported selenium servers:
- Remote selenium server
# features/support/continous_integration.rb
APP_SERVER_HOST = ENV['CI_APP_SERVER_HOST'] || 'localhost'
APP_SERVER_PORT = ENV['CI_APP_SERVER_PORT'] || 8080
SELENIUM_SERVER_URL = ENV['CI_SELENIUM_SERVER_URL'] ||
'http://127.0.0.1:4444/wd/hub'
::Configurator.new do |app_server, selenium_server|
app_server.host = APP_SERVER_HOST
app_server.port = APP_SERVER_PORT
app_server.config_ru_path = File.(
File.join(__FILE__, '../web_app/config.ru'))
selenium_server.server_url = SELENIUM_SERVER_URL
selenium_server.capabilities = { browser_name: browser_name }
end.configure
Contributing
- Fork it ( https://github.com/dsaenztagarro/capybara_selenium/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request