I faced the same issue, unless the login window even didn't show up at first.
To prevent usage of the current user and start showing the login popup:
How to disable Integrated Windows Authentication (IWA) for Chrome via Windows' Control Panel:
(This applies to both Internet Explorer and Chrome since Chrome uses system settings that are managed using Internet Explorer.)
Press Windows' Start button, type "Internet Options" to search, and
click the one result, from the control panel
Go to the "Security" tab
Select "Local Intranet" and click on "Custom Level" button
Scroll to the "User Authentication" section at the bottom of the
list and select "Prompt for user name and password"
Click Ok, Apply, and Ok to save changes.
Close all instances of the IE browser to make the changes effective. Launch the browser again and access the application. A basic authentication challenge will be served.
To login as desired user: HTTP Authentication
using var context = await Browser.NewContextAsync(new()
{
HttpCredentials = new HttpCredentials
{
Username = "bill",
Password = "pa55w0rd"
},
});
var page = await context.NewPageAsync();
await page.GotoAsync("https://example.com");