Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Chrome window size setting work on Heroku CI? #101

Open
daidekman opened this issue Dec 15, 2020 · 0 comments
Open

Does Chrome window size setting work on Heroku CI? #101

daidekman opened this issue Dec 15, 2020 · 0 comments

Comments

@daidekman
Copy link

Thanks for a tremendously helpful buildpack!

This issue relates to the window size setting, which does not seem to be working when running in the Heroku CI environment.

I am using the configuration for setting the window size, like this:

https://stackoverflow.com/questions/59361503/how-to-run-rails-system-tests-in-heroku-ci

and this:

https://stackoverflow.com/questions/18390071/change-default-capybara-browser-window-size

In Heroku CI, the configuration to set the window size does not seem to be honored. Is there another way to set it to have the Heroku CI environment manage the window size?

This is the code in the capybara.rb configuration:

`chrome_bin = ENV.fetch('GOOGLE_CHROME_SHIM', nil)

chrome_opts = chrome_bin ? { "chromeOptions" => { "binary" => chrome_bin, "args" => %w[headless disable-gpu window-size=1400x1400] } } : {}

Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.new(
app,
browser: :chrome,
desired_capabilities: Selenium::WebDriver::Remote::Capabilities.chrome(chrome_opts)
)
end`

Is that the correct way to set window size?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant