Skip to content

Commit af46e76

Browse files
Merge pull request #3323 from Delta456/headless
Update headless parameter in "Use WebDriver to automate Microsoft Edge"
2 parents 648590d + 5128997 commit af46e76

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • microsoft-edge/webdriver-chromium

microsoft-edge/webdriver-chromium/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: msedgedevrel
66
ms.topic: conceptual
77
ms.service: microsoft-edge
88
ms.subservice: devtools
9-
ms.date: 09/24/2024
9+
ms.date: 12/12/2024
1010
---
1111
# Use WebDriver to automate Microsoft Edge
1212

@@ -281,7 +281,7 @@ You can pass an `EdgeOptions` object to the `EdgeDriver` constructor to configur
281281

282282
###### Choose Specific Browser Binaries
283283

284-
You can start a WebDriver session with specific Microsoft Edge binaries. For example, you can run tests using the [Microsoft Edge preview channels](https://www.microsoft.com/edge/download/insider), such as Microsoft Edge Beta, Dev, or Canary.
284+
You can start a WebDriver session with specific Microsoft Edge binaries. For example, you can run tests using the [Microsoft Edge preview channels](https://www.microsoft.com/edge/download/insider), such as Microsoft Edge Beta, Dev, or Canary, as follows:
285285

286286
##### [C#](#tab/c-sharp)
287287

@@ -328,13 +328,13 @@ let driver = edge.Driver.createSession(options);
328328

329329
###### Pass extra command-line arguments
330330

331-
You can use `EdgeOptions` to configure command-line arguments that will be passed to the Microsoft Edge browser process when a session is created. For example, you can configure the browser to run in headless mode.
331+
You can use `EdgeOptions` to configure command-line arguments that will be passed to the Microsoft Edge browser process when a session is created. For example, you can configure the browser to run in headless mode, as follows:
332332

333333
##### [C#](#tab/c-sharp)
334334

335335
```csharp
336336
var options = new EdgeOptions();
337-
options.AddArgument("headless");
337+
options.AddArgument("--headless=new");
338338

339339
var driver = new EdgeDriver(options);
340340
```
@@ -346,7 +346,7 @@ from selenium import webdriver
346346
from selenium.webdriver.edge.options import Options
347347

348348
options = Options()
349-
options.add_argument("headless")
349+
options.add_argument("--headless=new")
350350

351351
driver = webdriver.Edge(options = options)
352352
```
@@ -355,7 +355,7 @@ driver = webdriver.Edge(options = options)
355355

356356
```java
357357
EdgeOptions options = new EdgeOptions();
358-
options.addArguments("headless");
358+
options.addArguments("--headless=new");
359359

360360
EdgeDriver driver = new EdgeDriver(options);
361361
```
@@ -366,7 +366,7 @@ EdgeDriver driver = new EdgeDriver(options);
366366
const edge = require('selenium-webdriver/edge');
367367

368368
let options = new edge.Options();
369-
options.addArguments("headless");
369+
options.addArguments("--headless=new");
370370

371371
let driver = edge.Driver.createSession(options);
372372
```

0 commit comments

Comments
 (0)