Micro Focus QTP (UFT) Forums
How to Record DatePicker in QTP - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to Record DatePicker in QTP (/Thread-How-to-Record-DatePicker-in-QTP)



How to Record DatePicker in QTP - upadhyay40 - 11-24-2009

Hello All,

Can anybody tell me how can i click on DatePicker & select a particular year and then select a date from cell, hoping for cooperation.

Thanks
Mahesh


RE: How to Record DatePicker in QTP - v_selvam - 11-24-2009

Hi Magesh,

You can set the date value directly in to date picker.
sfwObject("name").Set Date 'this will set today's date

If you want to set other date convert the string in to Date data type using CDate and then set it.


RE: How to Record DatePicker in QTP - upadhyay40 - 11-24-2009

Hi v_selvam,

This code is not working showing error , object cannot found sfwObject, Is this possible actually my datePicker field is non editable,
my code is Browser("Add Survey").Page("Add Survey").Image("calendar-ico")

Please help me out, hoping for cooperation

Thanks
Mahesh


RE: How to Record DatePicker in QTP - jsknight1969 - 11-24-2009

That object is actually an image and probably has a OnClick event calling a javascript function. You might try searching on calling the OnClick event in this forum. I know there have been examples of it in the past.