Last active
November 7, 2025 15:23
-
-
Save blafri/ea0744a0be2571a7a32ed5947451f354 to your computer and use it in GitHub Desktop.
Hack to fix browser size issues with the current version of chrome driver that is not respecting the screen_size option.
This file contains hidden or 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
| # There is a bug with the chrome driver that does not respect the screen_size option, so we have this hack | |
| # to resize the window to the proper size after it visits a page. | |
| # | |
| # This should be removed in the future once the bug is fixed. | |
| # | |
| # See: https://github.com/SeleniumHQ/selenium/issues/15827 | |
| def visit(...) | |
| super.tap do | |
| page.driver.browser.manage.window.resize_to(1400, 800) | |
| end | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should be added to
test/application_system_test_case.rbinside theApplicationSystemTestCaseclass