Search code examples
qtphp-uft

How to set a date in monthcalendar using QTP for windows UI?


This is for windows UI automation. I am having a month calendar object in my .net windows application and it does not have any field to input the date directly. The dates within the month are not getting recognized by Object Spy. I want to select a random date which will be getting passed via code in UFT. The calendar object's class type is WindowsForms10.SysMonthCal32.app.0.13965fa_r30_ad1

Thanks


Solution

  • I've had same issues in a Java application : - check here Unable to Set/Select Date on JavaObject through UFT/QTP

    Assuming that you have the necessary addin installed/Selected. Try to check what sort of methods are available with the calender object. Such situation is a deadlock. The only way you can get around is

    1. if the calender object has tab order i.e. you can select the dates through [TAB] or Arrow keys. Then you can use the Sendkeys Method
    2. The last option is to involve the development team and ask them to change/edit the object such that UFT can identify it.

    for me, we discarded the date functionality until the developer fixed the object.