getting all the tag elements of same kind : Automation API

getting all the tag elements of same kind

Class library usage, coding and language questions.

getting all the tag elements of same kind

Postby edxxgardo » Wed Mar 31, 2010 1:32 pm

Hello,

Is there any way of getting (via C# and Ranorex API) all of the tag elements from a web page under test? For example, I want to get all the <input> or <select> tags in a list-like format.
Thanks in advance,

Dario
edxxgardo
 
Posts: 13
Joined: Wed Mar 10, 2010 2:22 pm

Re: getting all the tag elements of same kind

Postby Support Team » Wed Mar 31, 2010 2:34 pm

Hi Dario,

With the Ranorex Method Find you will get back a IList of all <tags> if you are using the correct RxPath.
e.g.
//Difference between to listDiv only the /body//div and body/div
//You get all "Children Children" div tags from the body down
IList<DivTag> listDiv = Host.Local.Find<DivTag>("/dom[@caption~'YourHomepage']/body//div");
//You get all "Children" div from the body
IList<DivTag> listDiv = Host.Local.Find<DivTag>("/dom[@caption~'YourHomepage']/body/div");


Regards,
Peter
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4843
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