Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Absent Member.. Absent Member..
Absent Member..
1885 views

Pop up calendar's date selection scripting in UFT 12.5 [For web based application]

I am having a problem when recording the calendar date from a pop-up. The date records as a Link, when the script is run the calendar appears and the date is selected, but the click (which removes the calendar from view is not happening. The date, in this case day '30' is being recorded as text. Also, how can I get this date to be dynamic? 

2016-08-30_12h07_18.png

 

Here is the script that's recorded:

Browser("Browser").Page("Page_2").Image("...").Click

Browser("Browser").Page("Page_2").Link("30").Click

0 Likes
1 Reply
Commander
Commander

The calendar functionality can be achieved in the following steps:

Wrtie Date Utility function to convert a given date in to 3 parts 'year', month and day

Foreg: selectDatefromCalendar("10/5/2016")

Should do the following:

Convert the date in to three

Date-5

Month is 10 which corresponds to 'Oct' in calendar

Year 2016

Now click on the small calendar icon to open the calendar.

Now create descriptions for values in drop down of year and month

Select the appropriate year and month from the values you converted

Finally create collection of objects for days in that month.

Loop through the child objects, if you find the date you looking for click on that date(child object)

 

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.