Skip to content

Commit 871eeba

Browse files
committed
Disable chrome 127+ search engine pop-up in tests
1 parent 11923b4 commit 871eeba

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/functional/Chrome/ChromeDriverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private function startChromeDriver($w3cDialect = true): void
8787

8888
// Add --no-sandbox as a workaround for Chrome crashing: https://github.com/SeleniumHQ/selenium/issues/4961
8989
$chromeOptions = new ChromeOptions();
90-
$chromeOptions->addArguments(['--no-sandbox', '--headless=new']);
90+
$chromeOptions->addArguments(['--no-sandbox', '--headless=new', '--disable-search-engine-choice-screen']);
9191
$chromeOptions->setExperimentalOption('w3c', $w3cDialect);
9292
$desiredCapabilities = DesiredCapabilities::chrome();
9393
$desiredCapabilities->setCapability(ChromeOptions::CAPABILITY, $chromeOptions);

tests/functional/WebDriverTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ protected function setUp(): void
4646

4747
if ($browserName === WebDriverBrowserType::CHROME) {
4848
$chromeOptions = new ChromeOptions();
49-
// --no-sandbox is a workaround for Chrome crashing: https://github.com/SeleniumHQ/selenium/issues/4961
5049
$chromeOptions->addArguments([
5150
'--headless=new',
5251
'--window-size=1024,768',
53-
'--no-sandbox',
52+
'--no-sandbox', // workaround for https://github.com/SeleniumHQ/selenium/issues/4961
5453
'--force-color-profile=srgb',
54+
'--disable-search-engine-choice-screen',
5555
]);
5656

5757
if (!static::isW3cProtocolBuild()) {

0 commit comments

Comments
 (0)