iexplore main window not found and RPC server unavailable
This post is actually about two issues. I doubt the second one has anything to do with TestComplete but thought someone here might have seen it and be able to comment on it and both appear in the image of the log snapshot I've attached.
the first issue has to do with the Sys.WaitBrowser statement. I am testing my web functionality with four separate browsers (iexplore, firefox, chrome and edge). at the start of each test iteration, i pass the string value of the browser being tested into a script that ensures a copy of that browser is not already active and closes it if it is. i've ensured that no browser was running when i started the test that produced the attached log. Note the Time Diff (sec) column of the log when checking "iexplore" and when checking "firefox". Why does it take a full minute for TestComplete to realize that there's not an IE browser running and less that 5 seconds to do the same task for firefox? Below is the vbscript code that both checks are using. As you can see i"ve tried to shorten any check to 2 seconds both in the Options.Run.Timeout and in the Timeout parameter of the Sys.WaitBrowser method but it still takes a minute. I've noticed the same delay with edge but not with chrome.
Sub BrowserCheck(browser)
Log.Message "Browser = " + browser
Options.Run.Timeout = 2000
If Sys.WaitBrowser(browser, 2000).Exists Then
Sys.Browser(browser).Close
End If
End Sub
The second issue is the RPC Server unavailable. I found this article online
https://helpdeskgeek.com/help-desk/how-to-fix-rpc-server-is-unavailable-error-in-windows/
and went through everything it suggested but everything it mentioned (services, Network, registry settings) was already set up correctly on my workstation. The project suite i was running when i took the snapshot of the attached log was running four keyword tests. The first ran through all four browsers successfully. The image is of the second keyword test in the project. It completed the IE iteration of the test but got the RPC server error on Firefox. Once the RPC error started all the tests following that falied on Internet Explorer with the same error. As i said, I'm fairly certain this has nothing specifically to do with TestComplete but just though maybe someone out there has had to deal with this.
Thanks!
As BenoitB , there could be an iexplore process running in your Windows environment that doesn't have a UI... this is a pain in my side with regards to iexplore.. even when you close the browser manually, sometimes that process remains memory resident. So, your WaitBrowser process FOUND the browser... but couldn't call the "Close" command because there was no window to close.
What I've taken to doing is, rather than attempting the "Close", I'd actually use "Terminate" to kill the process entirely.