|
录的QTP自带的WEB SAMPLE,选的插件是WEB和JAVA:
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "jacksboy"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "4881f3be3bd9c2c41331f01bbd620c99c5cf6c81"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 31,6
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromPort").Select "New York"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toPort").Select "San Francisco"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury_2").JavaApplet("showCalendar").JavaButton("View Calendar").Click
JavaWindow("Select Departure Date").JavaList("Year:").Select "2008"
JavaWindow("Select Departure Date").JavaList("Month:").Select "July"
'Window("Select Departure Date").WinButton("16").Click
JavaWindow("Select Departure Date").WinButton("16").Click 124, 142, micLeftBtn (出错)
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury_2").WebList("fromDay").Select "16"
回放到JavaWindow("Select Departure Date").WinButton("16").Click 124, 142, micLeftBtn
这里总出错(这是一个JAVAAPPLET日期控件),说什么“the statement is one or more invalid function argument,难道CLICK后面写错了?
在OBJECT REPOSITORY里可以识别到WINBUTTON16这个控件。
谢谢 |
|