Issue
I have a script that currently has a user logged in to a website on a regular chrome window but I also want to open an incognito chrome window to have another user log in to the same website. The website has SSO so opening another regular chrome tab will just log in the first user again and both users need to be signed in at the same time. Is there a way to launch an incognito chrome window from the regular chrome window with selenium?
Solution
start you driver like below
WebDriver chromedriver;
ChromeOptions options = new ChromeOptions();
options.addArguments("--incognito");
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
WebDriver chromedriver=new ChromeDriver(capabilities);
Answered By - nika65
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.