Page 1 of 1

How to identify time fields?

Posted: Wed Feb 08, 2012 7:57 am
by bsing
Hi there,

I am trying to identify a scrollable time field on a form, which works, but puts the accessablename attribute to the actual time listed in the field. The next time I load up the form the time is different, and the recording module cannot find the UI object in the repositry.

Is there a way of getting around this?

Re: How to identify time fields?

Posted: Wed Feb 08, 2012 8:37 am
by Support Team
Hi,

please have a look at the mentioned control in Ranorex Spy and see if you can find another attribute with which the control can be identified uniquely.
Another approach would be to use regular expressions to identify the control by the structure of its accessible name and not the name self as described here.

Regards,
Tobias
Ranorex Support Team

Re: How to identify time fields?

Posted: Fri Feb 17, 2012 3:33 am
by bsing
The only unique attribute to define the time field is 'accessiblename'

eg. normally Ranorex identify's the time field using .../list[@accessiblename='12:56 PM']

Tried using this Regular expression, but the highlight and verify options could not find this field when I had the form open.

container[@controlname='dtcTimeOccured']/datetime[@controlname='dtpTime']/list[@accessiblename='[0-9]+:[0-9]+\ (AM|PM)']

Any suggestions?

Re: How to identify time fields?

Posted: Fri Feb 17, 2012 8:56 am
by Support Team
Hi!

The regular expression seems to be correct, if the field has a value e.g. 12:56 PM.

Can you create a Ranorex snapshot file and post it here?

Regards,
Martin
Ranorex Support Team

Re: How to identify time fields?

Posted: Mon Feb 20, 2012 12:54 am
by bsing
Actually its working fine now ... using the Regular Expression that I posted. Thanks for help!