Search code examples
google-chromeauthenticationselenium-webdriverautomated-testsnunit

Headless mode in chrome 97 is not working with windows auth


I use windows auth on build agent on teamcity

chromeOptions.AddArgument("--auth-server-whitelist=*");
chromeOptions.AddArgument("--auth-negotiate-delegate-whitelist=*");

And run autotests in headless mode.

  chromeOptions.AddArgument("headless");
  chromeOptions.AddArgument("window-size=1920x1200");
  chromeOptions.AddArgument("--no-sandbox");

Everything has been working fine until Chrome was auto-updated to 97 version. After that my windows auth just stopped working(but it still works for runs without headless mode). I installed old Chrome version on my agents and it works again. But I want to continue both - get updates to Chrome and run my autotests in headless mode.

I tried to add some extra arguments but they didn't work.

options.addArguments("--window-size=1920,1080");
options.addArguments("--disable-gpu");
options.addArguments("--disable-extensions");
options.setExperimentalOption("useAutomationExtension", false);
options.addArguments("--proxy-server='direct://'");
options.addArguments("--proxy-bypass-list=*");
options.addArguments("--start-maximized");
options.addArguments("--headless");

Any idea how to fix this issue?


Solution

  • The Chrome command line arguments changed from whitelist to allowlist: https://www.ibm.com/support/pages/change-kerberos-windows-authentication-registry-settings-chrome-and-edge-sso

    Making that change seems to work for me.