HtmlFindExpression.

4 posts, 0 answers
  1. SD
    SD avatar
    62 posts
    Member since:
    Apr 2010

    Posted 21 Feb 2011 Link to this post

    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. 
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 22 Feb 2011 Link to this post

    Hello Seth,
       I wasn't able to confirm this issue.  You seem to be using an older version of the WebAii Framework. Currently this implementation of the method accepts an additional boolean pameter like this:
    Manager.ActiveBrowser.WaitForElement(new HtmlFindExpression("id=someId"), 2500,false);
    So it's possible that the problem existed at some point but has since been fixed. Please upgrade to the latest available version of the WebAii framework are recheck.

    On your second questions:
    Here's some info (and examples) on FindExpressions:
    http://www.artoftest.com/support/webaii/topicsindex.aspx

    I hope this helps!

    Best wishes,
    Stoich
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. SD
    SD avatar
    62 posts
    Member since:
    Apr 2010

    Posted 22 Feb 2011 Link to this post

    Ta Stoich, 

     I was under the impression that the latest webaii API is http://www.artoftest.com/support/webaii/WebAii_2.0_API 
     Isn't it ? 
     
    Ta, 
    Seth. 

  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 23 Feb 2011 Link to this post

    Hello Seth,
        I actually meant you were using on older version of the WebAii Framework. You can download the latest one from here:
    http://www.telerik.com/downloads/productfiles/bbbce/WebAii_Testing_Framework_2010_3_1421_FREE_EDITION.msi

    Yes, this is the latest API documentation we currently have available:
    http://www.artoftest.com/support/webaii/WebAii_2.0_API
    but it's still a bit outdated, I'm sorry to say.

    All the best,
    Stoich
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top