Hi All,
I am automating a web application which uses "windows intergrated authentication". So access the URL, based on the windows logged on user, the home page is displayed. There is no login page concept.
Now as with any web application, we have different user roles.
User A
User B
I need selenium script to run few tests with User A & few with User B ( not with the user logged on to the server)
I am using Selenium C# Web Driver dlls & IE Driver(2.35version & 64-bit)
What I have done so far
==================
a) I have created Impersonator.cs file which uses C# Impersonation. Thanks to the following link
b) In the selenium script, I use the above class & set the logon to "User A" & then launch IE browser
>> Private Impersonate _imp;
>> _imp = new Impersonate("username","domain","pwd");
>> IwebDriver driver = new InternetExplorerDriver(); // Please assume I set the IEDriver.exe to the correct path
I get the following error
"Unexpected error launching Internet Explorer. Could not get document from window handle(NoSuchDriver)
Note: The same code works when I impersonate with the windows logged in user.
Appreciate if anyone would have a look at this