0
votes

Please help me in automating date control object using QTP.

I'm trying to automate date control as it picks the user required date (** can be from previous year too) during run time. But I couldn't achieve it by using the date control object, as that IMAGE object doesn't have any in-built operations to select required.

Note: Textbox is disabled and so we cannot enter the date into it directly, so we should select the required date from the calendar object. Thanks!

27-Mar-2015: Updating with AUT screen for more clarity

Here is the date control I'm trying to automate, prior to this application, I just used to add the textbox control and SET the required date into it. But in this case, the textbox is not editable, and so we I have to pick the date from the date control object - most the dates (inputs) are from past years.

So I just tried to capture the control object and it's got recognized as IMAGE, using which I couldn't perform only the click action.

enter image description here

Please check and help. Thanks!

2
Show what you´ve tried so far. Show what your AUT GUI looks like, technicallym, especially the date picker. Then we might have a chance to come up with suggestions. - TheBlastOne
Included more information, please check and help. - zeal

2 Answers

0
votes

Just a quick workaround to enable the calendar textbox & to enter the value

Browser(..).Page(..).WebEdit(...).Object.disabled = False
Browser(..).Page(..).WebEdit(...).Set "12/12/2000"
0
votes

Well you can try descriptive programming.

Define obj that is of type link and then use ".childobjects" property to pick up the date from a webtable.

Note: Here I am considering the calender is a webtable, and dates in it are links.

Please also let me know if this worked for you, and if somebody has any other thoughts most welcome. Thanks!