This is a migrated thread and some comments may be shown as answers.
HtmlFindExpression.
3 Answers 149 Views
This is a migrated thread and some comments may be shown as answers.
SD
Top achievements
Rank 1
SD asked on 21 Feb 2011, 10:26 PM
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. 

3 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 22 Feb 2011, 02:02 PM
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!
0
SD
Top achievements
Rank 1
answered on 23 Feb 2011, 04:00 AM
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. 

0
Stoich
Telerik team
answered on 23 Feb 2011, 06:20 PM
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!
Asked by
SD
Top achievements
Rank 1
Answers by
Stoich
Telerik team
SD
Top achievements
Rank 1
Share this question
or