selenium: IE11 Don't work InPrivate Mode and ie.ensureCleanSession with RemoteWebDriver

Meta -

OS: WIN 10 x64 1709 16299.64

Selenium Version:
Server 3.8.1 Client 3.8.0 IEDriverServer.exe 3.80

Browser:
Internet Explorer 11

Browser Version:
11.64.16299.0

Expected Behavior -

The browser starts with clean cookie, localstorage, history and etc

Actual Behavior -

The browser starts with the data from the last session

Steps to reproduce -

https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver Follow the instructions Required Configuration and Multiple instances of InternetExplorerDriver

>>> import selenium
>>> selenium.__version__
'3.8.0'
>>> from selenium import webdriver
>>> opt = webdriver.ie.options.Options()
>>> opt.force_create_process_api=True
>>> opt.add_argument('-private')
>>> caps = webdriver.DesiredCapabilities.INTERNETEXPLORER.copy()
>>> caps.update(opt.to_capabilities())
>>> caps
{'platform': 'WINDOWS', 'browserName': 'internet explorer', 'se:ieOptions': {'ie.browserCommandLineSwitches': '-private', 'ie.forceCreateProcessApi': True}, 'version': ''}
>>> driver = webdriver.Remote(command_executor='http://host:4445/wd/hub', desired_capabilities=caps)
>>> driver.get('https://google.com')

**Enter your login and password to log in to your account**
>>> driver.quit()

>>> driver = webdriver.Remote(command_executor='http://host:4445/wd/hub', desired_capabilities=caps)
>>> driver.get('https://google.com')

**Authentication already passed**

The same thing you need to repeat with the option ie.ensureCleanSession

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Any update on this?

opt.ensure_clean_session = True