Skip to content

Commit

Permalink
test chrome headless with chrome beta
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed May 4, 2017
1 parent a09b64b commit ed7eb73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ matrix:
- google-chrome
packages:
- google-chrome-stable
- google-chrome-beta
- awesome
- gemfile: gemfiles/Gemfile.ruby-20
env:
Expand Down
10 changes: 8 additions & 2 deletions spec/selenium_spec_chrome.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@

Capybara.register_driver :selenium_chrome do |app|
args = ENV['TRAVIS'] ? ['no-sandbox' ] : []
args << 'headless' if ENV['CAPYBARA_CHROME_HEADLESS']
if ENV['CAPYBARA_CHROME_HEADLESS']
args << 'headless'
Selenium::WebDriver::Chrome.path='/usr/bin/google-chrome-beta' if ENV['TRAVIS']
end
Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
end

Capybara.register_driver :selenium_chrome_clear_storage do |app|
args = ENV['TRAVIS'] ? ['no-sandbox' ] : []
args << 'headless' if ENV['CAPYBARA_CHROME_HEADLESS']
if ENV['CAPYBARA_CHROME_HEADLESS']
args << 'headless'
Selenium::WebDriver::Chrome.path='/usr/bin/google-chrome-beta' if ENV['TRAVIS']
end
Capybara::Selenium::Driver.new(app, :browser => :chrome,
:args => args,
clear_local_storage: true,
Expand Down

0 comments on commit ed7eb73

Please sign in to comment.