Chandra Shekhar Chandra Shekhar - 11 months ago 174
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.



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");