Skip to content

Commit 36bd191

Browse files
authored
Change flag for Chrome/Edge headless mode in tests (SeleniumHQ#15831)
* Change Chrome/Edge startup flag from `--headless=new` to `--headless`
1 parent 679b0f3 commit 36bd191

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

java/test/org/openqa/selenium/edge/EdgeDriverFunctionalTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void canSetPermission() {
116116
@NoDriverBeforeTest
117117
public void canSetPermissionHeadless() {
118118
EdgeOptions options = new EdgeOptions();
119-
options.addArguments("--headless=new");
119+
options.addArguments("--headless");
120120

121121
localDriver = new WebDriverBuilder().get(options);
122122
HasPermissions permissions = (HasPermissions) localDriver;

java/test/org/openqa/selenium/testing/drivers/Browser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public Capabilities getCapabilities() {
5050
}
5151

5252
if (Boolean.getBoolean("webdriver.headless")) {
53-
options.addArguments("--headless=new");
53+
options.addArguments("--headless");
5454
}
5555

5656
options.addArguments(
@@ -84,7 +84,7 @@ public Capabilities getCapabilities() {
8484
}
8585

8686
if (Boolean.getBoolean("webdriver.headless")) {
87-
options.addArguments("--headless=new");
87+
options.addArguments("--headless");
8888
}
8989

9090
options.addArguments(

py/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def get_options(driver_class, config):
229229

230230
if headless:
231231
if driver_class == "Chrome" or driver_class == "Edge":
232-
options.add_argument("--headless=new")
232+
options.add_argument("--headless")
233233
if driver_class == "Firefox":
234234
options.add_argument("-headless")
235235

@@ -393,6 +393,6 @@ def chromium_options(request):
393393
options = webdriver.EdgeOptions()
394394

395395
if request.config.option.headless:
396-
options.add_argument("--headless=new")
396+
options.add_argument("--headless")
397397

398398
return options

0 commit comments

Comments
 (0)