Is there any way to open Microsoft Edge (Chromium) in private mode with Selenium Python. I tried the below code, but it does not work.
options = webdriver.EdgeOptions()
# try set --incognito option, but it does not work
options.add_argument("--incognito")
# try inprivate mode try set w3c option, but it does not work
capabilities = DesiredCapabilities.EDGE
capabilities['ms:inPrivate'] = True
self.mWebDriver = webdriver.Edge(executable_path=PATH_EDGE_WEBDRIVER,
options=options, capabilities=capabilities)
Updated: I also try "-inprivate" as suggestions, but it still open Edge in normal window
options = webdriver.EdgeOptions()
options.add_argument("-inprivate")
self.mWebDriver = webdriver.Edge(executable_path=PATH_EDGE_WEBDRIVER,
options=options)
@RichEdwards said that "-inprivate" option works with C# source code. So I think the issue comes from python selenium library, not msedgedriver
Thanks.