If you need to use this as a root user (such as within some docker containers)
you will need to set a GOVUK_TEST_CHROME_NO_SANDBOX environment variable.
You can reuse the Selenium options for headless Google Chrome for configuring
other Selenium driven tests, such as Jasmine:
class ChromeHeadlessJasmineConfigurer < JasmineSeleniumRunner::ConfigureJasmine
def selenium_options
{ options: GovukTest.headless_chrome_selenium_options }
end
end
Should you need to configure the options for your application the recommended
approach is to re-register the headless Google Chrome driver: