Micro Focus QTP (UFT) Forums
How To Select Date From a Calender Image Where Date field is non editable? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How To Select Date From a Calender Image Where Date field is non editable? (/Thread-How-To-Select-Date-From-a-Calender-Image-Where-Date-field-is-non-editable)



How To Select Date From a Calender Image Where Date field is non editable? - RameshKrishnan - 05-24-2012

How To Select Date From a Calender Image Where Date field is non editable?

In my application ,there is form in which I have to select a Date for a field only through Calender Image .We can't set the Date field with some value as it is non editable.We have to use only Calender.Can someone please help with the script.FOllowing is my script

Code:
Browser("Login to KMAPI").Page("Login to KMAPI").WebEdit("bemsId").Set "5555"
Browser("Login to KMAPI").Page("Login to KMAPI").WebButton("Login").Click
Browser("Login to KMAPI").Page("Knowledge Management and").Frame("instancesFrame").Link("Business Support").Click
Browser("Login to KMAPI").Page("Knowledge Management and").Frame("instancesFrame_2").WebEdit("bsTitle").Set "Test Full Flow"
Browser("Login to KMAPI").Page("Knowledge Management and").Frame("instancesFrame_2").WebEdit("estimatedHours").Set "11"
Browser("Login to KMAPI").Page("Knowledge Management and").Frame("instancesFrame_2").WebButton("Submit").Click
Browser("Login to KMAPI").Dialog("Windows Internet Explorer").WinButton("OK").Click
Browser("Login to KMAPI").Page("Knowledge Management and").Frame("mainFrame").Link("My Work Items").Click
Browser("Login to KMAPI").Page("Knowledge Management and").Frame("myWorkItemsFrame").Link("Business Support").Click
Browser("Login to KMAPI").Page("Knowledge Management and").Frame("myWorkItemsFrame").Link("Complete and Close Request").Click
Browser("Business Support").Page("Business Support").Image("calender").Click 12,12
Browser("Business Support").Page("Business Support").Image("calender_2").Click 3,8
Browser("Business Support").Page("Business Support").WebButton("Close Request").Click


Issue : In the Above script the Calender click is not happening when I rerun the Test.As the field is non editable ,we can select the date only through the Calender Image
Iam not able to set the date directly.So can you please let me know how to loop the Calender and pass the value to get the date or is there any other solution for this.

This has become blocker issue,I am not able to proceed due this.As all my page contains calender date selection.


RE: How To Select Date From a Calender Image Where Date field is non editable? - defcon3 - 05-28-2012

Have you tried this solution https://www.learnqtp.com/forums/Thread-Calendar-Object , the calendar is a java object.