I am having an hard time figuring out how to launch Selenium Webdriver for Chrome in incognito mode.
I understand I need to pass the --incognito parameter to chromedriver, but how do I do that when creating the driver instance?
This is how I am currently instantiating my driver object:
require("chromedriver");
const webdriver = require("selenium-webdriver");
const driver = new webdriver.Builder().forBrowser("chrome").build();
new webdriver.Builder().forBrowser("chrome").setChromeOptions({args: ['--incognito']}).build();... else this looks promising too: gist.github.com/anandsunderraman/e351485319a8a0e7df7e