Created
January 24, 2013 00:43
-
-
Save liammagee/4616410 to your computer and use it in GitHub Desktop.
Increase window size for Selenium/PhantomJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Capybara.register_driver :phantomjs do |app| | |
driver = Capybara::Selenium::Driver.new(app, browser: :phantomjs) | |
driver.browser.manage.window.resize_to(1920, 1440) | |
driver | |
end |
if anybody else with a legacy app still using phantom comes across this, driver.browser.resize(x, y)
worked for us
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe it should be driver.manage.window.resize_to ? Since driver.browser would return a symbol, and manage method won't be available on it.