How to By Pass NTLM authentication pop up while performing automation testing using Selenium web driver for Chrome browser?

You might be facing issue for domain login as browser converts domain separator \ to / and credentials become invalid. Use encoded separator %5C and it will work.

Browser will convert https://domain\username:password@URL to https://domain/username:password@URL.

User encoded separator for request.
https://domain\username:password@URL => https://domain%5Cusername:password@URL


As @BhuvaneshMani has mentioned in the comment's on this answer...

You need to observe how the NTLM is getting authenticated. (use the devTools in chrome under Network)

After you find the authentication call use that URL!

As @BhuvaneshMani's example:

For e.g., app url may be app.url however after hitting the url, it redirects to auth.server.url. So if you append username and password into app.url it wont work. It should be appended to auth.server.url.

So your code should look something like this:

driver = webdriver.Chrome(executable_path=chromedriver_path, chrome_options=options)
driver.get("https://username:[email protected]")

Or (I found that most authentication calls are to the same URL just to the server port: port:8080/auth/login)

driver.get("https://username:[email protected]:8080/auth/login")

Hope this helps you!