Webpage UI element validation

Class library usage, coding and language questions.
Mairtino
Posts: 2
Joined: Thu Nov 03, 2011 12:45 pm

Webpage UI element validation

Post by Mairtino » Mon Feb 13, 2012 3:32 pm

Hi

I am looking for advice on how I can validate innertext in a website
For an application I can use public bool waitFor(Ranorex.Core.Repository.RepoItemInfo obj, string property, object propValue, int waitTimeout)

That does not work with on certain web elements and Im not sure what methods can be used.

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Webpage UI element validation

Post by Support Team » Tue Feb 14, 2012 1:03 pm

Hi!

Do this with the recorder, while recording with Ranorex Recorder, click on validate on your recording toolbar, move your mouse to the element you are interested in, click on it, then a dialog pops up with all elements available for the element you are interested in, and select the InnerText Attribute.

The recorder is generating the following code for a validation on a InnerText attribute.

Code: Select all

Validate.Attribute(repo.WebDocumentWebpage_UI_element_valid.LabelTagJump_to_Info, "InnerText", "ValueToValidate");
Regards,
Martin
Ranorex Support Team
.
Image