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

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
harinidsm
Posts: 8
Joined: Thu May 14, 2015 9:53 pm

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

Post by harinidsm » Wed May 27, 2015 9:21 pm

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.

harinidsm
Posts: 8
Joined: Thu May 14, 2015 9:53 pm

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

Post by harinidsm » Wed May 27, 2015 9:23 pm

Sorry, attachment is missing in the previous post. Attached is the same.

Thanks.
Attachments
UI_text fields.png
UI_text fields.png (10.56 KiB) Viewed 1056 times

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Thu May 28, 2015 3:15 pm

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
Shortcuts usually aren't...