Edge Chromium opens already logged in to site

I have some tests recorded in Katalon Studio using Chrome browser, which run fine. However, when I try to run them in Edge Chromium, it doesn’t go to the login screen for the website but instead is already logged in. I assume it has some cookies stored or something? When I run tests in Chrome I get a fresh browser instance, so it has to go through the login process, which is what I want.

Is there a setting in Katalon studio to make Edge Chromium open the same way, without cookies or cached data? I don’t want to run in ‘in private’ mode if I can avoid it, since that stops recording and Spy Web working.

Please show your Test Case script — we need to see how you open a brower. Do you use WebUI.openBrowser() or open browser using new ChromeDriver(...)? Do you have any DesiredCapabilities specified by code?

If you are using WebUI.openBrowser(), please show your project’s setting. Show us how

  • Project Setting > Desired Capabilities > Web UI > Edge
  • Project Setting > Desired Capabilities > Web UI > Chrome
    are set.

Do you find the Desired Capability for Edge is blank? or do you find something like "profile-directory=Profile 1"?

I am opening the browser at the start of the script using WebUI.openBrowser(GlobalVariable.AppUrl).

Desired capabilities are blank for both Chrome and Edge Chromium:

I did add two values to Desired Capabilities for Edge Chromium to make it run in ‘In Private’ mode as a test, but I took them out again because I want to run the tests in normal mode.

Do you find the same thing, that Edge is automatically logged in on going to a site that you have previously logged in to?

This seems like a good candidate for the cause of the problem:

I’m logged into the website on Chrome, so if it’s importing cookies from Chrome on launch, that would explain how I am already logged in on Edge. I tried logging out on Edge, then closing and reopening the browser: I was already logged in. Then I tried logging out on Chrome too. Now when I reopened Edge, I finally got the login screen. But the Import browser data on each launch setting mentioned in the article does not appear in my settings, so I can’t turn it off.

Edit: When I opened Edge manually, the setting did appear. I turned it off, and now the manual instance is going to the login screen. But this hasn’t fixed the problem in Katalon: if I’m logged in to the site in Chrome, then I am automatically logged in when I try to run a test in Edge Chromium. Can I change this browser setting somehow in Katalon?

This is not an issue with Katalon, but Edge is missbehaving as you already prove it.
So you have to figure it out how to disable this by a certain capability and add it in Katalon for Edge Chromium.

Turning off the setting in Edge did not disable it in the version opened by Katalon. So I was hoping I could add something to Desired Capabilities to turn it off.


Thank you for the link. I didn’t know this: Edge has a feature to copy a Chrome profile. Interesting stuff.

I think you have copied a Chrome profile at least once. So the Edge’s Default profile is already been infected. Edge profile has the copied cookies already. Edge seems to have no capability to reset the Default profile to blank.

If you want to bring the Edge profile back to an initial state, I think you can do:

  • create a new Chrome profile, name it, for example, “Clean”
  • with the new Chrome profile, you should NOT do any login operation into your Application Under Test; keep it uninfected
  • configure Edge; copy the Chrome “Clean” profile into Edge. This will sweep out your Edge Default profile.
  • and configure Edge not to copy any Chrome profile

Then the Default Edge profile profile will be like the “Clean” profile; your test can use Edge and test “login” processing.

Well, perhaps this may help you somehow, read it carefully:

So, with the suggestions from kazu and a bit of effort of your side, you may get something.
You have to work on the Edge, with a fresh profile, take a snapshot of it, apply the change needed, take one more snapshot and diff them.

This may result in a certain capability which you can further apply.
Since Edge is Chromium based, some of the tips and trick suggested there should work, but perhaps in a different way.

Note that, I am not using Edge and I never will, so you have to figure out everything by yourself.