Use --headless=new for Chrome in Capybara#14426
Merged
cbliard merged 6 commits intorelease/13.1from Dec 18, 2023
Merged
Conversation
`./modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rb` is failing with error `undefined method `execute_cdp' for #<Selenium::WebDriver::Chrome::Driver:0x..fe768862b9701efbc browser=:"chrome-headless-shell">`. The `--headless` flag uses the old headless mode of Chrome. Since version 120, this version's name is "chrome-headless-shell". This name is not properly recognized in selenium-webdriver 4.16.0 and some extensions are not loaded, like the one allowing to use execute_cdp. This will be fixed in next selenium-webdriver with this PR: SeleniumHQ/selenium#13271 In the meantime, using the new headless mode with `--headless=new` fixes the issue.
4d96c3b to
06a58e0
Compare
This prevents spec/features/work_packages/details/markdown/todolist_spec.rb:157 from passing.
spec/features/wiki/attachment_upload_spec.rb:107 got broken when using `--headless=true`: when resizing the image and scrolling on the handle, it scrolled out of bound to align the handle to the top of the page, instead of aligning with the top of the text area. By scrolling and aligning on the center vertically, it stays visible and the drag handle can be dragged and dropped.
It's hard to stabilize all tests with new headless
e99fb22 to
e086485
Compare
8 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
./modules/my_page/spec/features/my/my_spent_time_widget_with_a_negative_time_zone_spec.rbis failing with errorundefined methodexecute_cdp' for #<Selenium::WebDriver::Chrome::Driver:0x..fe768862b9701efbc browser=:"chrome-headless-shell">`.The
--headlessflag uses the old headless mode of Chrome. Since version 120, this version's name is "chrome-headless-shell". This name is not properly recognized in selenium-webdriver 4.16.0 and some extensions are not loaded, like the one allowing to use execute_cdp.This will be fixed in next selenium-webdriver with this PR: SeleniumHQ/selenium#13271
In the meantime, using the new headless mode with
--headless=newfixes the issue.Edit: the
--headless=newhas been activated only for the one failing spec.