Reputation: 21
Im trying to test against Internet Explorer 11 browser multi threaded using selenium webdriver C# with IEDriverServer.exe.
I can now launch multi threaded IE browsers with their own test scripts and interact with it but it seems that all of the IE browsers that were launched shares the same session and login.
For example I'm testing gmail site.
1st browser thread launches gmail home page > logins at gmail site
2nd browser thread launches gmail home page. Gmail already logged in.
How can I set internet explorer 11 to have its own session? How can I log in as different users on a same site? so as to not make each of my multi thread test not interfere with each other.
heres my setting on IE browser
var myOptions = new InternetExplorerOptions()
{
BrowserAttachTimeout = TimeSpan.FromSeconds(60),
RequireWindowFocus = false,
IntroduceInstabilityByIgnoringProtectedModeSettings = true,
IgnoreZoomLevel = true,
EnsureCleanSession = true,
PageLoadStrategy = InternetExplorerPageLoadStrategy.Eager,
ValidateCookieDocumentType = true,
InitialBrowserUrl = "about:Tabs",
BrowserCommandLineArguments = "-noframemerging"
};
myOptions.AddAdditionalCapability("INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS", true);
myOptions.BrowserCommandLineArguments = "-private";
originalWebdriver = new InternetExplorerDriver(@"C:\Download" + BrowserCtr + @"\IEDriverServer", myOptions);
I've tested on mozilla firefox and it seems that each instance of firefox browser have their own session.
Hope somebody can help and give me a definite answer
Upvotes: 2
Views: 1695
Reputation: 3927
did you tried first cleaning the browser before invoking by thread? in java like below
DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);
Thank You, Murali
Upvotes: 1