Telerik Forums
Testing Framework Forum
3 answers
125 views
Hi Guys,

I am currently running IE6, with the latest WebAii, and when I set the browser to InternetExplorer I get the following:
SetUp : 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.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)
at WebAiiTestClass.TestBase.TestBaseSetUp() in TestBase.cs: line 21
--TimeoutException
at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
at ArtOfTest.Common.WaitSync.For(Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
at ArtOfTest.Common.WaitSync.For(Predicate`1 predicate, T target, Int32 timeout)
at ArtOfTest.Common.Win32.WindowManager.Attach(ref IntPtr handle, Boolean findTabWindow, Boolean loadClr, ref IntPtr hookId)
at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename)

The browswer opens but sits on about:blank.

Note that I am only using the WebAii, and not the testing suite.

The same test works fine in Firefox, and I do not have access to chrome to test it.

I have all the settings set according to:

http://www.artoftest.com/support/webaii/topicsindex.aspx?topic=configureie6

But still no help.

Unfortunately upgrading to IE7+ is not an option. Please any help would be greatly appreciated.

Also just incase it helps:

namespace WebAiiTestClass
{
    [TestFixture]
    public abstract class TestBase : BaseTest
    {
        protected internal SilverlightApp App { get; private set; }
 
        [SetUp]
        public void TestBaseSetUp()
        {
            var settings = GetSettings();
            settings.EnableSilverlight = true;
            settings.LogLocation = @"C:\Documents and Settings\alicross\My Documents\Dev\UI\Testing\WebAiiTestClass";
 
            Initialize(settings, NUnit.Core.TestContext.Out.WriteLine);
            Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
            ActiveBrowser.NavigateTo("http://localhost:4882/TestPage.aspx");
            App = ActiveBrowser.SilverlightApps()[0];
        }
 
        [TearDown]
        public void TestBaseTearDown()
        {
            CleanUp();
        }
 
        [TestFixtureTearDown]
        public void TestBaseFixtureTearDown()
        {
            ShutDown();
        }
    }
}

Thanks for your help guys

Daniel Djambov
Telerik team
 answered on 07 Mar 2011
1 answer
89 views

How can I use a variable in the code "searchLnk = ActiveBrowser.Find.ByContent(contentvalue);" 

Where conentvalue was previously defined by contentvalue = “btnG”;

Rather than searchLnk = ActiveBrowser.Find.ByContent(”btnG”);


is there a way NOT to have to use a LITERAL value?

thanks joe

Cody
Telerik team
 answered on 05 Mar 2011
5 answers
174 views
Hi all.

As we have to support multi-browser automated tests, the tests must run in both IE and Firefox.
After installing the latest build of WebAii we finally can work fine with both of them.
Still I suspect a funny problem with these browsers because they render non-breakable space ( ) in different manner.
Just have a look at this piece of HTML code:

<a href="http://google.com">mega&nbsp;link</a>

Looks usual.

But now, if I want to find this link by the text it contains, troubles appear.

Settings settings = new Settings(BrowserType.InternetExplorer, "d:\\log\\");
Manager manager = new Manager(settings);
 
manager.Start();
 
manager.LaunchNewBrowser();
manager.ActiveBrowser.NavigateTo("http://aspspider.ws/kovyar/find_bycontent_test.htm");
manager.ActiveBrowser.WaitUntilReady();
 
Element element = manager.ActiveBrowser.Find.ByContent("mega link"); //null in both browsers, the desired way to find the element
 
Element element1 = manager.ActiveBrowser.Find.ByContent("mega link".Replace(' ', (char)160)); //null in IE
Element element2 = manager.ActiveBrowser.Find.ByContent("mega link".Replace(" ", "&nbsp;"));  //null in FF
 
Assert.IsNotNull(element1); //here fails IE
Assert.IsNotNull(element2); //here fails FF
 
manager.Dispose();

You can switch the browser type right in the first line of the code.
The general trouble is that I cannot process this link in the same way in FF and IE.
The second problem is that the types of spaces in the text can change (so the appearance of the text would be the same, but spaces would be different).

So we need a way of finding elements on the page which will not depend on:
1) browser type
2) type of spaces used by developers.

It would be really good if there is such a way, because our tests use Find.ByContent very often.

Thanks,
Yaroslav

Konstantin Petkov
Telerik team
 answered on 03 Mar 2011
6 answers
71 views
Hi, I downloaded Web UI Test Studio Developer version to automate Silverlight Application. I can't automate it because Web UI test Studio doesn't record anything. Finally I find our developer uses frameset .

When I automate the same Silverlight Application without frameset , I can automate it.

Does it support frameset ? Do you have any way to automate the Silverlight application with Frameset?

Thanks,

Amy
Daniel Djambov
Telerik team
 answered on 03 Mar 2011
3 answers
107 views
We stored values in our session in our site.

I see we can access cookies, but how can I verify session values?
Cody
Telerik team
 answered on 02 Mar 2011
9 answers
360 views
I have a website with several frame in an frameset:

...
<frameset rows="100%,0,0,0" onload="gotoUrl('/here_is_the_url',null)">
    <frame frameborder="0" name="frame1" src="about:blank">
       <html>
           <head>...</head>
           <body>
              <div id="divID">...</div>
           </body>
        </html>
    </frame>
    <frame scrolling="no" noresize="" frameborder="0" name="frame2" src="about:blank">...</frame>
    <frame scrolling="no" noresize="" frameborder="0" name="frame3" src="about:blank">...</frame>
    <frame scrolling="no" noresize="" frameborder="0" name="frame4" src="about:blank">...</frame>
    <noframes>
        <body bgcolor="#FFFFFF">
            <p>your browser does not handle frames</p>
        </body>
    </noframes>
</frameset>
...

In my case, I want to find the div element byID. I tried:
Browser frame = Manager.ActiveBrowser.Frames["frame1"];
Element divEle = frame.Find.byId("divID");

but I get a FindException. I debugged and I noticed that the DOM root element of the frame1 is null. Any DOM refresh had no effect. I tried to refresh root browser an all frames containing.

I used Firefox 3.5.16 and WebAii 2010.3.1213.0

How can I get the div element?
Cody
Telerik team
 answered on 01 Mar 2011
8 answers
110 views
I tried using HTMLInputText.IsActiveElement but it doesn't seem to work properly.
When running my test:
[Test]
public void GoogleTest()
{
    Manager.LaunchNewBrowser();
    ActiveBrowser.NavigateTo("http://www.google.com");
 
     
    HtmlInputText queryBox = Find.ByName<HtmlInputText>("q");
    Log.WriteLine(queryBox.IsActiveElement.ToString());
    Desktop.Mouse.Click(MouseClickType.LeftClick, queryBox.GetRectangle());
    Desktop.KeyBoard.TypeText("sample", 1000);
     
    Actions.Click(Find.ById("btnG"));
}

I can see that focus is in the url address box and not the search input box. queryBox.IsActiveElement is true so it's incorrect.
I also noticed that ActiveBrowser.NavigateTo works differently than launching the page manually.
In the first case focus is in the url address box in the latter its in search box.

1. Why IsActiveElement wrong?
2. Why NavigatTo works differently than manually?
Cody
Telerik team
 answered on 24 Feb 2011
6 answers
177 views
I wasn't sure if I should resurrect one of the previous threads or start my own. Either way, here's the issue.

My team has been running Webaii via Gallio test runner for the last year or so. We recently wanted to take advantage of some of the bug fixes in the most recent release. Our previous release was the 2010.1. I upgraded to 2010.3 and when attempting to launch any test, I get a timeout error akin to many of the others listed on these forums.

So far, I have tried:

  • Resetting the security settings on IE and following all of the steps on the configure IE 7 page.
  • I am on Windows 7 64-bit, and I have Ensured that I am building against x86.
  • I have set the local security settings to not restrict anonymous access to named pipes as indicated here.
  • I have attempted to uninstall and reinstall the webaii framework, during this process I made sure that all folders and assemblies were deleted as indicated here.
  • I have turned off all other addons in IE8. And I know that the new version doesn't use addons anymore, but I tried it anyway.
  • Running the test in firefox also does not produce results.
  • Ensured that there is only one manager being instantiated, considering the tests worked in 2010.1, this shouldn't be a problem but I checked anyway.
  • Ensured that I am only running IE8 32 bit edition.
Any help would be hugely appreciated. 

thank you,

Derick
Derick
Top achievements
Rank 1
 answered on 23 Feb 2011
3 answers
267 views
Hi guys, 

I've written the following method to help me 'wait' for buttons as a page uploads. 
public void WaitForButton(String awaitingButton)
    {
        StringBuilder buffer = new StringBuilder();
        buffer.Append("XPath=//input[@value=\"")
              .Append(awaitingButton)
              .Append("\"]");
 
        Manager.ActiveBrowser.WaitForElement(new HtmlFindExpression(buffer.ToString()), 20000);
       }

1. 20000 is WaitForElement's timeout therefore unless the button shows up within 20 sec from invoking the method, it should throw an       exception. For some reason it looks like a delay is created not a timeout. Are you aware of it? 

2. In addition, what are forms of HtmlFindExpression I can use other then Xpath ? Could you pls add an example? 

Ta. 
Stoich
Telerik team
 answered on 23 Feb 2011
2 answers
113 views
Does anyone know if there are any known issues using the WebAii proxy on a Virtual Machine? 

Currently we are seeing issues where all of our test machines are VM’s and at some point during the test run the proxy server will hang which causes all future test cases run on that machine to fail.  If we run without using the WebAii proxy we do not see this issue. 

As I have yet to find a way to set the User-Agent without using the Proxy for Safari we need this proxy to work and be stable. 

Any ideas?
Chris
Stoich
Telerik team
 answered on 22 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?