FindChild method

Ask general questions here.
atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

FindChild method

Post by atom » Thu Jul 23, 2009 1:13 pm

Hiya

Can you explain what the LABEL parameter means for the FindChild method
What attribute is it applied to? or is it a RxPath ?
Can you give an example.

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: FindChild method

Post by Support Team » Thu Jul 23, 2009 2:15 pm

Hi atom,
label is just the name of the node as you can see in the element tree view in Ranorex Spy.
It`s a convenience function to find nodes based on the element tree view.

e.g.
repo.MenuBarExplorer.Self.FindChild<Ranorex.Button>("start").Click();
clicks on the desktop start button.

Regards,
Christian
Ranorex Support Team

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: FindChild method

Post by atom » Fri Jul 24, 2009 2:50 pm

to get this straight "label" isnt applied to any attributes, only to the tag name itself?
can label be a regular expression?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: FindChild method

Post by Support Team » Mon Jul 27, 2009 8:44 am

It`s only the tag name of the node.
No, reg ex doesn`t work. You have to use the exact label string.

Regards,
Christian
Support Team