无法通过UFT/QTP在JavaObject上设置/选择日期 [英] Unable to Set/Select Date on JavaObject through UFT/QTP
问题描述
我正在尝试在Java应用程序上设置日期.下面是图片
I am trying to set date on a Java Application. below is the image
-
红色部分为:
The part in red is as :
JavaDialog("tagname:=DialogM").JavaList("index:=2")
我尝试在这里设置日期是徒劳的.我尝试对1和2使用选择",单击",但是没有用. 也尝试过使用SendKeys方法(以防万一)也不起作用. 我对实现此目标的想法一无所知.感谢任何帮助
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
推荐答案
问题是您拥有通用的 JavaCalendar 对象.因此,您将不会受益于JavaCalendar特定的方法,例如"SetDate",它将选择一个特定的日期.
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.
您是否尝试过记录并查看UFT的输出?
Have you tried to do a record and see the UFT's output?
这篇关于无法通过UFT/QTP在JavaObject上设置/选择日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!