Hi all,
I am getting the following exception after LaunchNewBrowser() is called (IE does get launched):
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.NullReferenceException : Object reference not set to an instance of an object.
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()
at YuntuMerchantUITest.YunTuAutomationBVT.AccountInfoBVT()
--NullReferenceException
at ArtOfTest.Common.Win32.WindowManager.Attach(IntPtr& handle, Boolean findTabWindow, Boolean loadClr, IntPtr& hookId)
at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)
I've seen similiar posts in the forum and have already done the following:
1. disabled UAC in server management tools
2. compile for x86.
3. loading the test dll using Nuit's x86 exe
4. change all IE security settings to align with the guide from WebAii.
Code:
Manager m = new Manager(false);
m.Start();
m.LaunchNewBrowser();
Environment:
IE8, version 8.0.7600.16385
Windows Server 2008 R2, 64bit
Same exact code runs perfectly fine my Win7 32bit machine. Same IE version and security settings. This leads me to believe it's a 32bit/64bit issue, however from TaskManager, the iexplorer.exe process has a *32 after it (which means it's a 32bit process).
Any insights? I am pretty much all out of ideas right now.
Thanks...
Xin
8 Answers, 1 is accepted
I apologize for the delay getting back to you on this problem. It sounds like something is not getting initialized properly in your code. Can you send us your test project for analysis? Just put the entire folder into a .zip and attach it to your reply.
Best wishes,Cody
Thanks...
Xin
I don't see our standard initialization being performed. I have attached a sample WebAii test designed to be run under NUnit. Please give this a try.
Regards,Cody
Thanks for your reply. I've added the init call in my code, however still getting back the same exact exception. Attaching the modified code.
The project I received still did not include the necessary setup/tear down code. I also found I had to change the .NET target framework to .NET 3.5 from .NET 4.0 in order to be compatible with the NUnit runner.
Regards,Cody
I am facing the same issue, when i try run it by a adminstartor login it works well but when i chnage the login to the logged in user i get a issue on launch browser
Code:
Error:
i have the tear down and clean up code in place..
Any clue as to why this is happening
the browser opnes but then gives the above exception
Thanks
How you are running your test? I assume you are running the test in Visual Studio. 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.
Kind regards,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.