Skip to content

Commit

Permalink
Update options so the new chrome driver version 120 will work
Browse files Browse the repository at this point in the history
Within our cucumber tests, fetching logs from the driver seems to be broken with the new chrome version 119 -> 120 upgrade.
This issue seems to be solved in this github issue thread by updating the options to '--headless=new'
SeleniumHQ/selenium#13112
  • Loading branch information
minhngocd committed Dec 15, 2023
1 parent 847f96d commit 61b1e73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/govuk_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def self.configure

def self.headless_chrome_selenium_options
Selenium::WebDriver::Chrome::Options.new.tap do |options|
options.add_argument("--headless")
options.add_argument("--headless=new")
options.add_argument("--no-sandbox") if ENV["GOVUK_TEST_CHROME_NO_SANDBOX"]
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/govuk_test_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
options = described_class.headless_chrome_selenium_options

expect(options).to be_instance_of(Selenium::WebDriver::Chrome::Options)
expect(options.args).to include("--headless")
expect(options.args).to include("--headless=new")
end

it "can be configured with an environment variable to run in no-sandbox" do
Expand Down

0 comments on commit 61b1e73

Please sign in to comment.