Unable to Set/Select Date on JavaObject through UF

2019-08-26 02:44发布

I am trying to set date on a Java Application. below is the image

enter image description here

  1. The part in red is as :

    JavaDialog("tagname:=DialogM").JavaList("index:=2")

  2. The part in Green is as : JavaDialog("tagname:=DialogM").JavaObject("tagname:=JCalendarField\$DayList", "Index:=0")

I've tried rather vainfully to set date here. I tried using "select", "click" with 1 and 2 and it didn't work. Also tried use SendKeys method (Just in case) didn't work either. I'm out of ideas on what i would do to achieve this. Appreciate any help here

1条回答
Viruses.
2楼-- · 2019-08-26 03:12

The issue is that you have a generic JavaObject instead of a JavaCalendar object. So, you won't benefit of JavaCalendar specific methods like "SetDate" which will select a specific date.

Have you tried to do a record and see the UFT's output?

查看更多
登录 后发表回答