Flex Component Loaded : Automation API

Flex Component Loaded

Class library usage, coding and language questions.

Flex Component Loaded

Postby Jonathan » Tue Dec 14, 2010 11:28 pm

I'm wondering if anyone has found a good way to recognize if a flex component has finished loading. We have a mixed html/flex page where the flex component can take a while to load. When I was just dealing with the html aspects I was using a WaitForDocumentLoaded() from WebDocument which was fine. Now that I need the flex components though this isn't enough.

I'm trying to avoid a System.Threading.Thread.Sleep and would prefer to use a more intelligent method, preferably one that doesn't require me explicitly stating which flex component I'm waiting for (so that I can use a single method for our various mixed pages).
Jonathan
 
Posts: 8
Joined: Wed Nov 10, 2010 10:36 pm
Location: Minnesota, USA

Re: Flex Component Loaded

Postby Support Team » Wed Dec 15, 2010 11:56 am

Hi,

You can use an element of your Flex component and wait till the item exists. Therefore you can use the Validate class or use the repository item to check if the item exists.

Repository item:
Ranorex.Form form = "/form[@processname='RanorexStudio']";
while(form.Active == false)
      Delay.Seconds(1);

Validate.Exists:
http://www.ranorex.com/Documentation/Ra ... ists_7.htm

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4842
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests