ref: master
features/support/selenium.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
require 'selenium/webdriver' Capybara.default_driver = :selenium Capybara.register_driver :selenium do |app| case ENV['SELENIUM_DRIVER'] when 'chrome' Capybara::Selenium::Driver.new app, browser: :chrome else Capybara::Selenium::Driver.new app, browser: :firefox end end Before('@ignore-hidden-elements') do Capybara.ignore_hidden_elements = true end Capybara.default_wait_time = 5 Capybara.server_host = "localhost" World(Capybara) |