Collective Idea

Collective Idea Logo

Brian Ryckbost

Chrome Profile Settings and Capybara 1.1 Stable

By Brian Ryckbost on January 25, 2013 in capybara and chromedriver

We previously blogged about how to test file downloads with capybara and chromedriver that explained how to create a profile that specified where to send downloaded files.

We had take a similar approach with a recent project, except instead of declaring a different download directory we were setting the window placement to alter Chrome’s size. This seems to have broken with a recent version of Chrome.

Instead of relying on settings like this to adjust Chrome’s window size:

profile['browser.window_placement.top'] = 0
profile['browser.window_placement.left'] = 0
profile['browser.window_placement.right'] = 10000
profile['browser.window_placement.bottom'] = 10000

Set the --window-size=width,height command-line switch by including the args hash option:

Capybara::Selenium::Driver.new(app,
  :browser => :chrome,
  :profile => profile,
  :args => ["--window-size=10000,10000"]
)
By Brian Ryckbost on January 25, 2013 in capybara and chromedriver

2 Comments

  1. Govinda

    Govinda May 04, 2013

    Do you know how the equivalent commandline switch/arg for┬áprofile[“download.default_directory”] is?

  2. #

    # July 28, 2013 http://www.kiwibox.com/ruddycoward929/blog/entry/108091495/ideas-bi-fold-patio-doors-white/?pPage=0

    The bathroom, kitchen and laundry room are the main areas – things like glasses or locks, drilling
    and cutting the toughened steel is not easy.
    You look at the initial price tag. Mrs Flatau moves comfortably around the room, the
    kind of significance that glass is gaining adding to the business.
    A glass fireplace door on the bottom of the new door into this prepared opening.

Post a Comment

Contact Us

Find us on Google Maps
Collective Idea
44 East 8th Street, Suite 410
Holland, Michigan 49423 USA 42.790334-86.105251

Follow us on the Interwebs

We are currently available for medium and long term projects. Please get in touch if we can be of service.