I have one scenario to automate :
Verify login with valid input
Problem Statement : Whenever I run script in IE for second time, Found all previous session are stored as it is . (Not found this same situation in Chrome and in Firefox)
My configuration :
- Windows 10
- Selenium 3.4.0
- IE 11
Code :
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
cap.setCapability(InternetExplorerDriver.INITIAL_BROWSER_URL, url);
cap.setCapability("ignoreProtectedModeSettings", false);
cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
cap.setJavascriptEnabled(true);
cap.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);
cap.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, false);
cap.setCapability(InternetExplorerDriver.ELEMENT_SCROLL_BEHAVIOR, 1);
cap.setCapability("cssSelectorsEnabled", true);
cap.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);
WebDriver driver = new InternetExplorerDriver(cap);
I want to clear all the history which is given in this picture with Selenium Webdriver + IE
just before starting script.
Note : If is there any other way to avoid it please let me know.