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,320 points
2,657 views

1 answer to this question.

0 votes

You are missing a single -...

"--incognito"

answered Aug 13, 2018 by Samarpit
• 5,910 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
4,915 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, 2019 in Selenium by Vaishnavi
• 1,180 points
1,027 views
0 votes
0 answers

How to configure ChromeDriver to initiate the browser in the Headless mode using Selenium?

I'm currently working on a Python script ...READ MORE

Apr 2, 2019 in Selenium by Surya
• 970 points
1,394 views
0 votes
1 answer

How to open Firefox window in Incognito mode using Selenium Webdriver?

Hi Pritha, you can use this code ...READ MORE

answered May 14, 2019 in Selenium by Anvi
• 14,150 points
6,548 views
0 votes
2 answers

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,500 points
12,577 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
8,559 views
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,910 points
6,606 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,506 views
+1 vote
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,910 points
13,665 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,910 points
9,263 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP