How to identify time fields?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
bsing
Posts: 81
Joined: Tue Feb 07, 2012 5:25 am

How to identify time fields?

Post by bsing » Wed Feb 08, 2012 7:57 am

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?

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

Re: How to identify time fields?

Post by Support Team » Wed Feb 08, 2012 8:37 am

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
.
Image

bsing
Posts: 81
Joined: Tue Feb 07, 2012 5:25 am

Re: How to identify time fields?

Post by bsing » Fri Feb 17, 2012 3:33 am

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?

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

Re: How to identify time fields?

Post by Support Team » Fri Feb 17, 2012 8:56 am

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
.
Image

bsing
Posts: 81
Joined: Tue Feb 07, 2012 5:25 am

Re: How to identify time fields?

Post by bsing » Mon Feb 20, 2012 12:54 am

Actually its working fine now ... using the Regular Expression that I posted. Thanks for help!