Highlighted
Absent Member.
Absent Member.
1859 views

Learning asp's date picker using QTP 9.5

Hello all:
QTP 9.5 recognizes the asp date picker as an object only.

Is there a way to make QTP learn it as a datepicker along with objects embedded in it?

I'll appreciate assistance, please.

0 Likes
14 Replies
Highlighted
Absent Member.
Absent Member.

The following steps might help. Try and see.

Install the web extensibility toolkit on QTP 9.5. Now, when you bring up QTP 9.5, you should see a mini add-in for aspAJAX besides the web add-in. Select both the web and ajax add-ins while bringing up QTP. Now, open your browser and spy on the same control.
0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks, Krishna for the information.

I installed the Extensibility toolkit and included it with my other list of add-ins (Active-X,Visual basic, & Web) but the behavior was not any different from pre-installation.

QTP still recognizes the datepicker as an image and the individual numerical dates as links. It seems I'll have to write a lot of code to select a date say couple of months prior to the current date.

I was hoping that QTP will recognize an object of type say Calendar so this object will worry about the selection of the actual date.

Is this possible?
0 Likes
Highlighted
Absent Member.
Absent Member.

first of all you shouldn't be selecting VB and ActiveX for this. You only need web and ajax add-ins.

Do that while bringing up QTP this time around, then bring up your browser and
a) try recording something on the control like clicking on the date picker and selecting a date
b) spy on the edit field associated with the control if you have one next to it that displays the selected date. You may be able to directly set a date in it without manipulating the control.
0 Likes
Highlighted
Absent Member.
Absent Member.

I disabled the Active-x and Visual basic.

1) I was also able to navigate through the calendar to pick a date but I could not replay the same session because during replay the calendar somehow filled up the width of the entire page and lost track of the Next(month) link. I recaptured the new Next image and found out it is on a page now as opposed to a frame.

I have attached screen shots, please.

2) Yes, I have always been able to manually insert a date in the edit field beside the date picker and so far I think that is my better solution right now.

I guess we were trying to include all features on the application in our automation as much as we can. But we'll have to concede if there is not a simple solution.

Thanks for the help, Krishna.

0 Likes
Highlighted
Absent Member.
Absent Member.

It will help if you can post screenshots of both the test object properties and runtime object properties that Object Spy can see on the actual Calendar control itself (when both the web and ajax add-ins are loaded), not the image that invokes the calendar upon a click.
0 Likes
Highlighted
Absent Member.
Absent Member.

Please find attached screenshots requested.
I appreciate the help.
0 Likes
Highlighted
Absent Member.
Absent Member.

In those screenshots, you are spying on a link, not the entire calendar control, which is what I wanted. You may have to use the control key to maintain focus and get Object Spy to look at it. Without it, I can't be of much help.

Ofcourse, there is always the possibility of researching about and implementing web extensibility here (not just installing the toolkit). You will need to use java script though and may have to work with your developers on it.
0 Likes
Highlighted
Absent Member.
Absent Member.

I appreciate your patience. Attached is a set of screen shots of calendar object.

In addition, I captured the innertext, outertext, innerhtml, & outerhtml text in full just in case it gives some clues.

It is quite interesting that the entire calendar is recognized as a webelement. However, in the previous screen shots the parent of the link is a webtable and parent of that is a frame.
0 Likes
Highlighted
Absent Member.
Absent Member.

Did you ever figure this out? I'm facing almost the exact same thing. We're using a Yahoo widget (http://developer.yahoo.com/yui/calendar/) and I'm stuck on it.

Thanks
0 Likes
Highlighted
Absent Member.
Absent Member.

I was hoping for a simpler solution but since there is none I'll have to write a function to pick a date. I have not done it yet but the idea behind it is...

The Calendar is basically a frame containing the next, previous, month-year date, and a webtable that has the days(as links).

Given a date, I'll check if the wanted month is the current. If it is not I'll use the previous and next links to navigte to the correct month-year date.

Then I'll select the day by link. The caveat with day selection is within a given month, the could be 2 instances of numbers 25-31; one set representing the previous month and the other set for the current month. The way around this is to ignore the link of text(25-31) if it falls within the 2nd row. (The first row is the S M T W T F S).

I hope this helps.
0 Likes
Highlighted
Absent Member.
Absent Member.

Helps a little.

Mine is a WebTable also with 2 or more months. Day 1-28 are on both calendars so I have to know which month to use first and then click the proper date.

Good luck with your function.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.