Page 1 of 1

How to compare a text field value from a web page?

Posted: Wed May 27, 2015 9:21 pm
by harinidsm
Hi,

I have done data binding to my test case using SQL connector. I need to compare a text field value e.g. phone number from my UI web page to match with my data in SQL connector. I have created variables for each text field value shown in the attached UI document. This is what I have in my xpath:
/dom[@domain='inside.pilot.theprincipal.net']/body/div[1]//p[@innertext=$PhoneNumber].

When I try to identify the Phone number field as Innertext, ranorex displays a error message in Spy on this line as: "No elements found for current selection".

My Windows version is Windows 7 and my Ranorex version is 5.3.2.

Thanks,
Harini.

Re: How to compare a text field value from a web page?

Posted: Wed May 27, 2015 9:23 pm
by harinidsm
Sorry, attachment is missing in the previous post. Attached is the same.

Thanks.

Re: How to compare a text field value from a web page?

Posted: Thu May 28, 2015 3:15 pm
by krstcs
What value is in the $PhoneNumber variable?

It looks like there are actually multiple sub-elements inside the table's phone number column. You may need to read each one of those independently.

Also, it would be more helpful if you would post a Ranorex Snapshot of the elements in question. You can find out how to create Ranorex Snapshots here: http://www.ranorex.com/support/user-gui ... files.html