Search code examples
hp-uft

Unspecified error while selecting a date from calendar in UFT


I am new to UFT and automating a desktop application, I am facing challenge while setting a date from calendar picker.

Window("Application").Window("Run Process Group").WinObject("01 / 14 / 2020").Click 442,7
Window("Application").Window("Run Process Group").Window("Window").WinCalendar("SysMonthCal32").SetDate "15-Jan-2020"

Click here to see my application Image

In the above lines value inside WinObject("01 / 14 / 2020") changes based on prepopulated date.

Window("Application").Window("Run Process Group").WinObject("01 / 14 / 2020").Click 442,7

This line is clicking on calendar however while executing second line I am getting an error saying unspecified error "Window("Application").Window("Run Process Group").Window("Window").WinCalendar("SysMonthCal32").SetDate "15-Jan-2020""

Please help me out to make this work, my requirement is to click on calendar(but calendar object's values changes based on prepopulated date so need to parameterize this) and select date(date will be passed from an external file)


Solution

  • Got the solution, actually I was not selecting all required UFT add ins, my application's window type is swfwindow but since I haven't selected add ins, UFT recorded it as window. after selecting add ins my issue is resolved.