# spec_helper.rbrequire'capybara/rails'# For Rails apprequire'capybara/rspec'# Load RSpec 3.5+ support# set up driverCapybara.register_driver:headless_chromedo|app|Capybara::Selenium::Driver.new(app,browser: :chrome,http_client: clientoptions: options)end## set up clientrequire'selenium-webdriver'client=Selenium::WebDriver.for:chrome# see also following link.## set up optionsoptions=Selenium::WebDriver::Chrome::Options.new.tapdo|opts|opts.args<<'--headless'end# configureCapybara.configuredo|config|config.ignore_hidden_elements=trueconfig.default_max_wait_time=3#secend
Top comments (1)
Should
## set up client
go before# set up driver
?As you use
client
within it!