This is a migrated thread and some comments may be shown as answers.

TimeoutException on ActiveBrowser.LaunchNewBrowser()

13 Answers 299 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
akesy
Top achievements
Rank 1
akesy asked on 16 Mar 2012, 01:40 PM
Hello,

For a couple of days I have been trying to solve an issue and I stucked. I am trying to run automated UI tests using Telerik WebAii Framework 2011.2.1413. The problem is, after launching browser nothing happens but I get TimeoutException: Wait for condition has timed out. The issue occurs only on Internet Explorer, tests on FireFox 3.6 run properly, though. I suppose it is not IE problem but some operating system security settings as I run tests on Windows Server  2008 R2 (x64). Tests run properly on IE9 on Windows 7 Ultimate (x64). I would like to also mention that tests run on Team Foundation Server 2010 build machine. Below, I have enclosed my system environment and thigns I have already done to try to make it work.

System Environment:
Windows Server 2008 R2 (x64) SP1
IE 8 (previously, I have tried to run test on IE9 but it did not work as well, that is why i downgraded IE to see wheater it is browser version problem)
MSTest
Telerik WebAii Framework 2011.2.1413
 
- I set target platform in project properties to x86
- I set Team Foundation Server 2010 Mode to Interactive Process
- I configured Internet Explorer as it is written <a href="http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/configure-your-browser/internet-explorer.aspx">here</a>.
- I turned off Internet Explorer Enhanced Security Configuration
- I turned off User Account Control
- I reinstalled Telerik WebAii Framework
- I set "Restrict anonymous access to named pipes and shares" to Disabled on Local Security Policy

TraceLog file from failed session:

DialogPlayback: DialogMonitor.Start() : Beginning monitoring for dialogs from the set {}.

Framework: InternetExplorerActions.LaunchNewBrowserInstance() : Process launched (ID=2612, Path="C:\Program Files (x86)\Internet Explorer\iexplore.exe", Arguments="-nomerge about:blank").

UIAutomation: AutomationExtensions.AddAutomationEventHandler() : Added a(n) WindowPatternIdentifiers.WindowOpenedProperty handler on element System.Windows.Automation.AutomationElement scope Descendants.

Framework: InternetExplorerActions.LaunchNewBrowserInstance() : Attempting to attach on IE frame (HWND=66614)...

DialogPlayback: DialogMonitor.AutomationEvent_OnWindowOpened() : New window detected, but not considered a dialog (Text = "Windows Internet Explorer", ClassName = "IEFrame").

Framework: Connector.Start() : Process launched (ID=3100, Path="C:\Windows\SysWOW64\rundll32.exe", Arguments="ArtOfTest.Connector.dll,AttachToWindowEntryPoint 132206").

Framework: Connector.Start() : Process exited (ID=3100, ExitCode=0, Path="C:\Windows\SysWOW64\rundll32.exe", Arguments="ArtOfTest.Connector.dll,AttachToWindowEntryPoint 132206").

Framework: InternetExplorerActions.LaunchNewBrowserInstance() : Process "QTAgent32" (ID=1936) is assumed to host the controller.

Framework: Connector.InjectCode() : ------- Function Start -------

Framework: Connector.InjectCode() : Connection string: C:\Windows\assembly\GAC_MSIL\ArtOfTest.InternetExplorer\2011.2.1413.0__5339893a7cefe4d6\ArtOfTest.InternetExplorer.dll?ArtOfTest.InternetExplorer.ArtOfTestPluginEntryPoint?1936

Framework: InternetExplorerActions.WaitForDocument() : Attempting to get IHTMLDocument2 from Internet Explorer HWND 132206 on another thread...

Framework: <>c__DisplayClasse.<WaitForDocument>b__7() : Attempting to get document from window handle

Framework: InternetExplorerActions.WaitForDocument() : IHTMLDocument2 successfully retrieved.

Framework: Connector.InjectCode() : Sending WM_COPYDATA to HWND 132206 (lpData = "C:\Windows\assembly\GAC_MSIL\ArtOfTest.InternetExplorer\2011.2.1413.0__5339893a7cefe4d6\ArtOfTest.InternetExplorer.dll?ArtOfTest.InternetExplorer.ArtOfTestPluginEntryPoint?1936")...

Framework: Connector.InjectCode() : Returned from sending WM_COPYDATA (LRESULT=0, GetLastError()=ERROR_ALREADY_EXISTS).

Framework: Connector.InjectCode() : ------- Function End -------

Framework: BrowserProvisioner.EndService() : Connecting to the provisioning pipe "Pipe.ArtOfTest.WebAii.BrowserProvisioner_696317534" in order to unblock and eventually terminate it...

Framework: BrowserProvisioner.EndService() : Provisioning pipe connected.

Framework: BrowserProvisioner.ServiceThread() : A new client has connected to the provisioning pipe but this will be treated as a termination cue.

Framework: BrowserProvisioner.EndService() : Provisioning thread terminated.

DialogPlayback: DialogMonitor.Stop() : Dialog monitoring is being halted.

TraceLog from passed session (FireFox 3.6):

[03/16 10:38:43,QTAgent32.exe(2628:13)] First trace message from process 2628: "c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe" /agentKey 2313be3d-37b0-43f1-8128-8c75e6338426 /hostProcessId 1928 /hostIpcPortName eqt-b14fb823-1ed9-ccf3-2bea-2e672dc75686
[03/16 10:38:43,QTAgent32.exe(2628:13)] First trace message from background thread "Agent: adapter run thread for test 'SampleWebAiiTest' with id '8fcc0856-0ea4-4f74-b955-3c367338568c'" (managed ID = 13, native ID = 2732).
[03/16 10:38:43,QTAgent32.exe(2628:13),DialogPlayback] DialogMonitor.Start() : Beginning monitoring for dialogs from the set {}.
[03/16 10:38:44,QTAgent32.exe(2628:13),Framework] FireFoxActions.EnumFireFoxInstallations() : Valid Firefox 3.6.0.20 installation found at "C:\Program Files (x86)\Mozilla Firefox\firefox.exe".
[03/16 10:38:45,firefox.exe(1936:1)] First trace message from process 1936: "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" about:blank?753956868
[03/16 10:38:45,firefox.exe(1936:1)] First trace message from background unnamed thread (managed ID = 1, native ID = 2740).
[03/16 10:38:45,firefox.exe(1936:1),Framework] BrowserRemoteClient constructor : The client ID for this hooked process will be "Client_2c97f56d-585a-4358-9975-233d960ddd64".
[03/16 10:38:45,QTAgent32.exe(2628:17)] First trace message from background thread "Pipe.ArtOfTest.WebAii.BrowserProvisioner" (managed ID = 17, native ID = 2720).
[03/16 10:38:45,QTAgent32.exe(2628:17),Framework] BrowserProvisioner.ServiceThread() : A new client has connected to the provisioning pipe.
[03/16 10:38:45,QTAgent32.exe(2628:19)] First trace message from background thread "Remoted async command listener" (managed ID = 19, native ID = 2300).
[03/16 10:38:45,QTAgent32.exe(2628:19),Framework] BrowserRemoted.AsyncListenerThreadEntry() : Not connected; this will now wait indefinitely for a pipe client connection...
[03/16 10:38:45,firefox.exe(1936:1),Framework] BrowserRemoteClient.CreateNamedPipes() : Named pipes created for communication with the server: {Command = "ae3c20d9-1d96-4639-abc2-3e0cb0a5352a.CommandPipe", Async = "ae3c20d9-1d96-4639-abc2-3e0cb0a5352a.AsyncPipe"}
[03/16 10:38:45,QTAgent32.exe(2628:18)] First trace message from foreground unnamed thread (managed ID = 18, native ID = 2648).
[03/16 10:38:45,QTAgent32.exe(2628:18),UIAutomation] AutomationExtensions.AddAutomationEventHandler() : Added a(n) WindowPatternIdentifiers.WindowOpenedProperty handler on element System.Windows.Automation.AutomationElement scope Descendants.
[03/16 10:38:46,QTAgent32.exe(2628:19),Framework] BrowserRemoted.AsyncListenerThreadEntry() : A new client has connected to the pipe.
[03/16 10:38:46,QTAgent32.exe(2628:19),Framework] BrowserRemoted.AsyncListenerThreadEntry() : Now waiting indefinitely for a command from the pipe client...
[03/16 10:38:46,QTAgent32.exe(2628:17),Framework] Manager.AddNewBrowser() : Added client ID "Client_2c97f56d-585a-4358-9975-233d960ddd64" (now there is/are 1 total).
[03/16 10:38:47,QTAgent32.exe(2628:18),UIAutomation] AutomationExtensions.AddAutomationPropertyChangedEventHandler() : Added property change handler on element System.Windows.Automation.AutomationElement scope Subtree with enlarged property set {ValuePatternIdentifiers.ValueProperty} now including {ValuePatternIdentifiers.ValueProperty}.
[03/16 10:38:47,QTAgent32.exe(2628:18),UIAutomation] AutomationExtensions.AddStructureChangedEventHandler() : Added a structure change handler on element System.Windows.Automation.AutomationElement scope Subtree.
[03/16 10:38:48,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnStructureChanged() : ChildAdded event sent by named element "Search".
[03/16 10:38:49,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnStructureChanged() : ChildAdded event sent by named element "http://fp-shp/Pages/default.aspx".
[03/16 10:38:49,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnValueChanged() : Named element "Szukaj w zakładkach i historii" changed its value from "" to "http://fp-shp/Pages/default.aspx".
[03/16 10:38:49,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnStructureChanged() : ChildAdded event sent by named element "Turn on more accessible mode".
[03/16 10:38:50,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnStructureChanged() : ChildAdded event sent by named element "My Newsfeed".
[03/16 10:38:51,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnStructureChanged() : ChildAdded event sent by named element "http://fp-shp/my/default.aspx".
[03/16 10:38:51,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnValueChanged() : Named element "Szukaj w zakładkach i historii" changed its value from "" to "http://fp-shp/my/default.aspx".
[03/16 10:38:51,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnStructureChanged() : ChildAdded event sent by named element "Adres".
[03/16 10:38:52,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnStructureChanged() : ChildAdded event sent by named element "Adam Kęsy".
[03/16 10:38:52,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnStructureChanged() : ChildAdded event sent by named element "http://fp-shp/my/personal/akesy/default.aspx".
[03/16 10:38:53,QTAgent32.exe(2628:18),DialogPlayback] DialogMonitor.AutomationEvent_OnValueChanged() : Named element "Szukaj w zakładkach i historii" changed its value from "" to "http://fp-shp/my/personal/akesy/default.aspx".
[03/16 10:38:53,QTAgent32.exe(2628:13),Framework] BrowserProvisioner.EndService() : Connecting to the provisioning pipe "Pipe.ArtOfTest.WebAii.BrowserProvisioner" in order to unblock and eventually terminate it...
[03/16 10:38:53,QTAgent32.exe(2628:13),Framework] BrowserProvisioner.EndService() : Provisioning pipe connected.
[03/16 10:38:53,QTAgent32.exe(2628:17),Framework] BrowserProvisioner.ServiceThread() : A new client has connected to the provisioning pipe but this will be treated as a termination cue.
[03/16 10:38:53,QTAgent32.exe(2628:13),Framework] BrowserProvisioner.EndService() : Provisioning thread terminated.
[03/16 10:38:53,QTAgent32.exe(2628:13),DialogPlayback] DialogMonitor.AddDialog() : Added {OnBeforeUnloadDialog(Dismiss=OK)} for monitoring.
[03/16 10:38:53,QTAgent32.exe(2628:13),Framework] Manager.RemoveBrowser() : Removed client ID "Client_2c97f56d-585a-4358-9975-233d960ddd64" (0 remaining).
[03/16 10:38:53,QTAgent32.exe(2628:13),Framework] Manager.SetActiveBrowser() : Active browser is now null.
[03/16 10:38:53,QTAgent32.exe(2628:13),Framework] BrowserRemoted.End() : Now aborting the listener thread (TID = 19).
[03/16 10:38:54,firefox.exe(1936:1),Framework] BrowserRemoteClient.Disconnect() : Sending ClientDisconnectRequest(ClientId="Client_2c97f56d-585a-4358-9975-233d960ddd64") to pipe server...
[03/16 10:38:54,firefox.exe(1936:1),Framework] BrowserRemoteClient.Disconnect() : Command pipe is already disconnected.
[03/16 10:38:54,QTAgent32.exe(2628:19),Warning] PipeCommunication.AsyncPipeRead() : Pipe read wait broken by thread-abort.
[03/16 10:38:55,QTAgent32.exe(2628:13),DialogPlayback] DialogMonitor.Stop() : Dialog monitoring is being halted.
[03/16 10:38:56,QTAgent32.exe(2628:18),UIAutomation] AutomationExtensions.RemoveAutomationPropertyChangedEventHandler() : Removed the property change handler on element System.Windows.Automation.AutomationElement scope Subtree.
[03/16 10:38:56,QTAgent32.exe(2628:18),UIAutomation] AutomationExtensions.RemoveStructureChangedEventHandler() : Removed the structure change handler on element System.Windows.Automation.AutomationElement scope Subtree.


Is it possible it is connected with a thing called Named Pipes? When test is running on FF and a browser launches I can see on address bar something like "Pipe.ArtOfTest.WebAii.BrowserProvisioner=/and here an integer value/" after about:blank but I cannot see it on InternetExplorer. I feel I did my best to make it work, I read hunderds of posts, I tried dozens of problem solutions but it still does not work, so I hope you can help me.

Regards,
Adam

13 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 21 Mar 2012, 12:37 PM
Hello A K,

The problem is that our tool requires an administrator level access to function properly in VS2010. As seen in this article(first solution), you always need to run Visual Studio as Administrator in order to be able to launch the browser. Follow this link to see how you can do that.

Also, have you restarted the machine after you turned off the User Account Control? Sometimes the machine needs to be restarted for the changes to take effect.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
akesy
Top achievements
Rank 1
answered on 22 Mar 2012, 10:45 AM
Hello Plamen,

Thank you for the reply. My VS2010 is running as administrator and I have restarted my machine after turning off User Account Contorl. It turned out that probably Primary Interop Assemblies were missing. I have tried to install PIA as a single download but without a success as while installing I was told I cannot install PIA without having MS Office installed. Then, an idea came to my mind to try install MS Office trial version to see whether installing PIA will solve my problem. Apparently, MS Office installed missing libraries and my tests run on Internet Explorer properly now. Do you now by any chance is there any possibility to install PIA without having MS Office installed or it is limitation of MS Office license?
0
Plamen
Telerik team
answered on 22 Mar 2012, 01:23 PM
Hello Adam,

It's not neccessary to have Microsoft Office installed. You'll find the PIA package at the end of this article, just unzip it and run the .exe file. This should resolve the problem. 

All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
akesy
Top achievements
Rank 1
answered on 27 Mar 2012, 01:08 PM
Hello Plamen,
Thank you for reply and advice. Indeed, installing PIA package you have given in the link solved the problem. Thanks a lot!
0
Jon
Top achievements
Rank 1
answered on 01 Oct 2012, 04:46 AM
Hi,

The zip in the linked article doesn't seem to be available anymore, is it still available somewhere?

-jon
0
Plamen
Telerik team
answered on 04 Oct 2012, 03:58 PM
Hello Jon,

I apologize for the delay in getting back to you and that the download link is broken. We are currently working to fix it as soon as possible. It seems we have a problem with the server hosting the file. I'll update the ticket once the link is fixed.

Thank you for your understanding and please excuse us for the inconvenience caused.

All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Plamen
Telerik team
answered on 05 Oct 2012, 11:45 AM
Hi Jon,

The link is fixed now.
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/installation-problems/failed-pia-deployment.aspx

I have also updated your Telerik points for reporting the issue.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Denis
Top achievements
Rank 1
answered on 11 Aug 2014, 02:15 PM
Hi Telerik Support Team.

We are using Telerik Testing framework (without Test Studio and recorder).
Now we need to migrate to Windows 7 and IE9 (prevously we used Windows XP and IE8). 
Could you please confirm that we need always run MS Visual Studio 2010 as Administrator to be able to launch IE correctly?
0
Cody
Telerik team
answered on 11 Aug 2014, 03:33 PM
Hello Denis,

Yes I can confirm that you must run Visual Studio at Administrator level in order for Test Studio to successfully connect to and control IE. Anything less and Windows will block our connection attempt as a "security threat".

This has always been true and is very unlikely to change anytime in the future.

We do use a different mechanism for connecting to the other browsers. They do not require administrator level.

Regards,
Cody
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Denis
Top achievements
Rank 1
answered on 11 Aug 2014, 04:08 PM
Cody, thank you for your reply. Does it matter if we use Telerik Testing framework, not Test Studio?
0
Cody
Telerik team
answered on 11 Aug 2014, 05:27 PM
Hi Denis,

No it does not. The same "must be run as administrator" applies to both.

Regards,
Cody
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Alexander
Top achievements
Rank 1
answered on 12 Aug 2014, 12:50 PM
Cody, can you explain in detail why an admin account is needed ?….  What permissions or enabled processes does it have that a non-admin account doesn’t have ?
What needs to be done to enable non-admins to use this product without having local admin rights ?
0
Cody
Telerik team
answered on 14 Aug 2014, 04:36 PM
Hello Alexander,

We use special API hooks that are only available in Internet Explorer to attach and inject code into the IE process directly. This gives us speed and full access to the DOM in IE, along with all the internal API's of IE for controlling the browser.

Windows will only let a user with Admin level privileges the ability to do that. You do not have to logon as THE administrator i.e. the local system administrator account, but simply have the account you are logging in as be a member of the Local Administrators group on that machine... OR, when using Visual Studio, launch Visual Studio "As Administrator" which will prompt the user for Administrator credentials essentially running it at administrator level. There are no permission settings anywhere you can set to allow a non-admin user the ability to allow another program to inject itself into IE.

Regards,
Cody
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
akesy
Top achievements
Rank 1
Answers by
Plamen
Telerik team
akesy
Top achievements
Rank 1
Jon
Top achievements
Rank 1
Denis
Top achievements
Rank 1
Cody
Telerik team
Alexander
Top achievements
Rank 1
Share this question
or