May be this question has been asked many times before. But i went through all the related questions in stackoverflow , but couldn't find any satisfactory solution.
Well i'am writing a selenium automation code in VS2010 using C#, IE11 is my web browser on which i'am performing testing. Using IEDriverServer 32bit version in Windows 7 to open IE instance.
I already knew that there is some compatibility kind of issue between selenium and IE 11, but still my code worked fine up till now when i started getting this Error - " NoSuchWindowException was unhandled : Unable to find element on closed window."
Below are my steps:-
IWebDriver driver = new InternetExplorerDriver("D:\\");
driver.Navigate().GoToUrl("http://aiaw00572.belldev.dev.bce.ca:8060/UTM_MechHDTool_UserWebApp");
driver.FindElement(By.Id("ctl00_cpMainContent_radcboTaskType_Input"), 10).Click();
driver.FindElement(By.XPath("//div[@id='ctl00_cpMainContent_radcboTaskType_DropDown']/div/ul/li[2]")).Click(); (this step select a drop down option which performs a postback on the page)
driver.FindElement(By.Id("ctl00_cpMainContent_utmTaskGrid_ctl00_ctl06_imgbtnStartWorking")).Click();//Getting error on this step. Earlier i was not getting it anywhere
I searched for the solutions for this problem and came to know about one solution in which some registry change has to be done to solve it, though that also does not confirm that it will solve the problem. But the problem here i can't even check this solution as i don't have any administrator privilege in my system.
So just wanted to know if someone else has also faced the problem and came with some solution, so he/she can share it here please as i badly need a solution in here for this situation.
Worked for me after running IEDriverServer as admin or setting protected mode for all zones (https://stackoverflow.com/a/21373224/217408)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With