How to start headless chrome in incognito mode?

0 votes

Under SpecFlow/Selenium, I'm starting Chrome like this:

    var options = new ChromeOptions();

    options.AddArguments("--headless", "--window-size=1920,1080", "--disable-gpu", "--disable-extensions", "--no-sandbox", "-incognito");

    var svc = ChromeDriverService.CreateDefaultService();

    svc.Start();

    Context.Driver = new ChromeDriver(svc, options);

Can it be done with headless? I also tried --incognito and incognito as well as placing the flag at different indices within the AddArguments() call.

Aug 13, 2018 in Selenium by Martin
• 4,210 points
314 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You are missing a single -...

"--incognito"

answered Aug 13, 2018 by Samarpit
• 5,130 points

Related Questions In Selenium

0 votes
1 answer

How to open chrome driver in incognito mode?

Hey @Sradha, You can use the below code:- System.setProperty("webdriver.chrome.driver","C:\\Users\\Nabarupa_Das\\Downloads\\chromedriver.exe"); ChromeOptions ...READ MORE

answered Dec 28, 2018 in Selenium by Nabarupa
97 views
0 votes
1 answer

How to start Chromedriver in verbose mode on Eclipse

Hi friend, here is a script that ...READ MORE

answered Mar 20 in Selenium by Vaishnavi
• 720 points
23 views
0 votes
0 answers
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,030 points
66 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
438 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
52 views
0 votes
1 answer

How to handle notifications in Python with Selenium (Chrome WebDriver)

Below will help you: You can disable the ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,376 views
0 votes
1 answer

How to control Chrome Downloads page Using Selenium c#?

In your case you must replace 'cancel' ...READ MORE

answered May 7, 2018 in Selenium by Samarpit
• 5,130 points
650 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.