How to run on EDGE browser in private mode

When I run Edge this browser doesn’t start in private mode so to test a login I have to logout first. How I can run this browser and set his Desired capabilities to run in private mode?

I tried this without success:

In case of Edge chromium. follow this link:
https://docs.katalon.com/docs/create-tests/manage-projects/project-settings/desired-capabilities/start-browsers-in-private-mode-in-katalon-studio#edge-chromium

Other option is to set it programmatically:

List edge_list = new ArrayList();
edge_list.add(‘-inprivate’)
Hashtable<String, String> edge_dict = new Hashtable<String, String>();
edge_dict.put(“args”, edge_list);
RunConfiguration.setWebDriverPreferencesProperty(‘ms:edgeChromium’, true)
RunConfiguration.setWebDriverPreferencesProperty(‘ms:edgeOptions’, edge_dict)

1 Like