Skip to content

Instantly share code, notes, and snippets.

@tacahiroy
Created November 12, 2015 16:10
Show Gist options
  • Save tacahiroy/0873afd71005e07d64ef to your computer and use it in GitHub Desktop.
Save tacahiroy/0873afd71005e07d64ef to your computer and use it in GitHub Desktop.
The way to specify window size in Capybara driver for Chrome
Capybara.register_driver :chrome do |app|
opts = {
browser: :chrome,
switches: %w( --test-type --window-size=1280,1024 )
}
Capybara::Selenium::Driver.new(app, opts)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment