2

The problem I am trying to solve is to login into a site that has SSO. I will need to login with different credentials at times so I don't want to SSO in. Therefore, I will open up an incognito tab in Chrome so the SSO login popup will show up every time: chromeOptions.addArguments("incognito"); This works fine when I am running not in a headless mode and using Java Robot to input the credentials.

However, when I run this in headless mode: chromeOptions.addArguments("headless"); I am back to square one where I got SSO'd in into my personal account without the manual control of inputting in different credentials. That's not what's happening when I have incognito in non-headless mode.

How exactly do I configure my Chromedriver through Java to be BOTH headless and incognito?

I need headless mode because I need to run this inside a Docker container.

Bryan Chen
  • 21
  • 1
  • I got the exact same issue. I've specified the --user-data-dir attribute to create a dedicated user data directory for the test run. But it didn't solve the issue. Any idea ? – Naweap Apr 24 '22 at 14:40

0 Answers0