in the last days the framework couldn't manage to open a browser and navigate to any site. Like nearly every of my problems in the last time this occured although I hadn't modified any of the code.
It isn't always the same Exception, but always gets thrown at LaunchNewBrowser.
This is today's Exception:
System.InvalidOperationException:
Sequence contains no elements
at System.Linq.Enumerable.Last[TSource](IEnumerable`1 source)
at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType
browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle
windowStyle, String arguments)
at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType
browserToLaunch, Boolean waitForBrowserToConnect)
at
ActaNova.TWebTest.Core.Utilities.ApplicationUtility.GetManager(String url,
HtmlFindExpression waitForElementExistsFindEx) in
c:\Development\AN\webaii\WebTest\TWebTest.Core\Utilities\ApplicationUtility.cs:line
632
And this is the other:
System.ApplicationException: Exception thrown attempting to launch Internet Explorer. Please make sure Internet Explorer is properly installed and you are able to launch it. ---> System.TimeoutException: Wait for condition has timed out
at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Int32 timeout)
at ArtOfTest.Common.Win32.Connector.Attach(IntPtr& handle, Boolean findTabWindow)
at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)
--- End of inner exception stack trace ---
at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)
at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect)
at ActaNova.TWebTest.Core.Utilities.ApplicationUtility.GetManager(String url, HtmlFindExpression waitForElementExistsFindEx) in c:\Development\AN\webaii\WebTest\TWebTest.Core\Utilities\ApplicationUtility.cs:line 632
I give it 10 tries and one second timeout between, but from time to time it doesn't work anyway.
What can be the reason for this and what could be the reason for all these problems occuring over night?
Thanks in advance!
11 Answers, 1 is accepted
I am sorry you are experiencing this issue.
Could you please check this article in order to overcome this issue. Please reset Internet explorer settings and then configure it again.
Let me know if this helps. Regards,
Boyan Boev
Telerik
Test Studio Trainings
Thanks for your help!
It seems like the problem solved itself the same way it occured. Today I couldn't reproduce it until now. If it comes up again I'll try your advise. But I don't beleive this would help as I didn't make any changes to the IE settings and also didn't install any add-ons.
Kind Regards
Glad to hear it! Thank you for the update.
Should you have any additional questions please do not hesitate to ask us.
Boyan Boev
Telerik
Test Studio Trainings
the problem came up again. I'm running tests on my local machine with IE9 and on a new VM with IE8.
In time it doesn't work with IE8 (but it did some hours ago and the last days) and sometimes also doesn't work with IE9 (but then just fails about three times).
I have already reset IE (on the VM) and configured it again but still got an InvalidOperationException. Then I reinstalled the framework and it worked... One time. Now it doesn't work again and I don't know what to do.
The other tipps from the article won't help. Everything is configured, installed, reinstalled and runs in x86 mode and there are no add-ons installed except of default ones.
Kind Regards
we managed to solve the problem. We had always waitForBrowserToConnect set to false when calling LaunchNewBrowser. This always worked, but stopped working over night.
I always thought that this would wait for the start site to be loaded. But what is this parameter for? You always have to wait for the browser to be ready and in the browsers collection anyway, don't you? If so, it would be like having a shouldWork parameter. What is it's real purpose?
Kind Regards
It is great to hear that you've been able to solve this issue by your own.
The reason we have this parameter, waitForBrowserToConnect, is to tell Test Studio whether to wait for the browser to return to a "ready" state or not.
Sometimes it is posible that the browser will not send "ready" state, although it should.
I agree with you that this name might be very misleading.
Regards,
Velin Koychev
Telerik
Test Studio Trainings
thanks for your answer!
So setting ths parameter to true might also lead to problems?
Kind Regards
Silvio
Yes, it is possible that you might experience issues even if you set waitForBrowserToConnect to True. However this is also very unlikely to happen, but it is good to be known as a potential problem.
Velin Koychev
Telerik
Test Studio Trainings
Ok, thanks for your answer!
Kind Regards
Hi I was facing a similar issue and all the solutions discussed in the forum did not help me out:
We are using ArtOfTest(WebAii) framework. All the testers were working fine and suddenly started failing from past few days with the following error.
Wait for condition has timed out
at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
at ArtOfTest.WebAii.Core.Manager.WaitForBrowserToConnect(Int32 browserIndexToWaitFor)
at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle)
Solution:
The reason for this error was because of some settings which was globally made on all our machines without our knowledge.
Allow third-party browser extensions setting in IE should be enabled.
This setting can be found For IE8 at : IE->Tools->Internet Options->Under 'Advanced Tab'->Under Heading 'Browsing'.
This setting can be added if found valid for everyone @ Configure the Browser
Thanks,
Kiran K N.
Thank you for sharing with us this solution.
We will investigate further what issues this IE setting could bring.
We appreciate your feedback!
Velin Koychev
Telerik
Test Studio Trainings