Skip to content

Instantly share code, notes, and snippets.

@strika
Last active April 25, 2016 14:37
Show Gist options
  • Save strika/e2d19d3132751f5cd198fdc3d302f809 to your computer and use it in GitHub Desktop.
Save strika/e2d19d3132751f5cd198fdc3d302f809 to your computer and use it in GitHub Desktop.
How to maximize Firefox in Selenium test

To maximize Firefox window in all Cucumber scenarios, place this in your support/env.rb.

Before do
  Capybara.current_driver == Capybara.javascript_driver
    page.driver.browser.manage.window.maximize
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment