Chandra Shekhar Chandra Shekhar - 1 year ago 360
Java Question

How to open web browser in incognito mode using Selenium- Java with Multiple Tabs

I want to open browser window in Incognito mode with multiple tabs using Selenium(Java). Browser should open 3 tabs parallely as soon as it is launched.

Answer Source


DesiredCapabilities capabilities =;
ChromeOptions options = new ChromeOptions();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);

Internet Explorer:

DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true); 
capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download