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

Tests unable to control my browsers?

11 Answers 296 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Aaron Hockley
Top achievements
Rank 1
Aaron Hockley asked on 17 Aug 2009, 04:05 PM
I've downloaded and installed the latest WebAii software and am attempting to start scripting some basic tests but I have hit a problem.  The first two steps in my script are to launch a browser and navigate to a URL.  The browser launches, but the script times out without nagivating to the URL.  Here's the start of the code:

       [TestMethod]
        public void NavigationSmokeTest()
        {
            // Launch a browser instance
            Manager.LaunchNewBrowser(BrowserType.InternetExplorer);

            // The active browser
            ActiveBrowser.NavigateTo("http://localhost/dcjlawlog");


I'm using VsTest.  I've tried changing to Firefox (updating the LaunchNewBrowser parameter) and it also times out after launching.

Any ideas?

11 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 17 Aug 2009, 08:34 PM
Hi Aaron Hockley,

Are you getting an error message saying timeout connecting to the browser? Do you have an another IE window open at the time you try to launch a test in IE? There's a known issue (will be fixed in the next release) where WebAii fails to connect to an IE browser if one is already open when you run your test.

Best wishes,
Cody
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aaron Hockley
Top achievements
Rank 1
answered on 17 Aug 2009, 09:15 PM
No, I don't have any other browsers open.  Here's the error stack trace:

ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
ArtOfTest.WebAii.Core.Manager.WaitForBrowserToConnect(Int32 browserIndexToWaitFor)
ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle)
ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch)
QATests.BasicNavTests.NavigationSmokeTest() in C:\code\DCJLawLog\Main\DCJLawLog\QATests\BasicNavTests.cs: line 154

The error message is:
Test method QATests.BasicNavTests.NavigationSmokeTest threw exception:  System.TimeoutException: Wait for condition has timed out.


0
Cody
Telerik team
answered on 18 Aug 2009, 02:16 PM
Hello Aaron Hockley,

Let's focus just on IE first. Once we get things working there we'll move on to Firefox.

Let's check our browser add-on. Go to Tools -> Add-ons. Verify there is a "WebAii 2.0 Test Execution Extension" add-on and that it is enabled. If it's disabled, enable it and try again. If it's enabled let's try disabling all other add-ons. Once in a while we run into incompatible add-ons.

If that doesn't work tell me more about your setup:
- What is your OS?
- Which version of IE are you running?
- Are you running this on a virtual machine?
- Have you tried uninstalling and reinstalling? It's rare but a few times the install didn't go right.

Kind regards,
Cody
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aaron Hockley
Top achievements
Rank 1
answered on 18 Aug 2009, 03:22 PM
Hi Cody, here's more info about my configuration:

The WebAii extension was installed and enabled; I tried disabling the other add-ons but it had no effect on the test.
Windows Server 2003, SP2
Running in a virtual machine (Virtual PC) with Win XP x64 as the host OS.
IE 7.0.5730.13

I tried removing/reinstalling the WebAii framework, after the reinstall I'm still seeing the same (broken) behavior.



0
Cody
Telerik team
answered on 19 Aug 2009, 01:45 PM
Hello Aaron Hockley,

Since you are running a 64-bit OS, can you verify which version of IE is being used (32-bit vs 64-bit). The way to tell is to look at the IE About box. If it's 64-bit IE, it'll say 64-bit in the about box. The 32-bit IE won't say anything. The reason this is important is we know we're not compatible with 64-bit IE.

If that doesn't help, can you try a 32-bit virtual image OS?

Best wishes,
Cody
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aaron Hockley
Top achievements
Rank 1
answered on 19 Aug 2009, 02:37 PM
Perhaps I wasn't clear in my original explanation:

The host operating system is Windows XP x64.
The virtual machine is running 32 bit Windows Server 2003, and thus I'm trying to run WebAii against the 32 bit version of IE
0
Cody
Telerik team
answered on 19 Aug 2009, 07:21 PM
Hello Aaron Hockley,

My apologies. I did get the two backwards (host OS vs VPC OS). At least I can confirm that WebAii is compatible with Win2K3 (32-bit) and IE 7. Normally this part just works... we have very few problems getting basic launch/navigation to work.

Would you please post your entire .cs file. I'll look it over and verify it looks fine. Do you have an app.config file in your solution? If so please post the contents of it as well.

Thanks,
Cody
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aaron Hockley
Top achievements
Rank 1
answered on 26 Aug 2009, 05:31 PM
Had some issues with my machine and had to rebuild, but even on a new install I'm having the exact same problem (the test launches the browser but never executes the navigation).

In order to simplify things, I'm now just trying to make it work using the default test that is created when creating a new WebAii test (open the browser, navigate to Google, do a search).  The browser opens, but it never navigates to Google.
0
Cody
Telerik team
answered on 27 Aug 2009, 03:13 PM
Hi Aaron Hockley,

After rebuilding your machine, are you still trying to run WebAii in a virtual PC (Win2K3 - 32bit)? I am beginning to wonder if it's something to do with the configuration of the VPC. We use NamedPipes for communication between the framework and our browser helper objects. If something is intefering with NamedPipes, that would cause the symptom you're seeing.

Can you do one of two things:
  • See if there's something wrong with NamedPipes in the virtual PC (e.g. is Network disabled??)
  • Try installing and running WebAii on a real machine such as your main development machine instead of VPC.

FYI, I'm in the process of writing a connection diagostic tool that will help troubleshoot issues like this. I need a few more days to polish it up. If we can't figure out your problem between now and then I want to send you this new tool and have you run it and see what it discoveres.

Kind regards,
Cody
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Aaron Hockley
Top achievements
Rank 1
answered on 27 Aug 2009, 04:02 PM
Good news... it's now working!

Your comment about Named Pipes led me to do a bit of exploring and Googling.  Networking was enabled on the machine, but I came across this post on Google Answers that indicated a Local Security Policy default on Windows Server 2003 that might be an issue.

I overcame the problem by opening the Local Security Settings applet from the Administrative Tools, going to Local Policies > Security Options, and changing "Network access: Restrict anonymous access to Named Pipes and Shares" from Enabled to Disabled.

I'm now able to run tests which are successfully controlling my browser.
0
Cody
Telerik team
answered on 27 Aug 2009, 04:18 PM
Hi Aaron,

That's wonderful! And it's a new one for us. We'll add this to our knowledge base.

Kind regards,
Cody
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Aaron Hockley
Top achievements
Rank 1
Answers by
Cody
Telerik team
Aaron Hockley
Top achievements
Rank 1
Share this question
or