Page 1 of 1

Webpage UI element validation

Posted: Mon Feb 13, 2012 3:32 pm
by Mairtino
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

Re: Webpage UI element validation

Posted: Tue Feb 14, 2012 1:03 pm
by Support Team
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