QTP脚本示例
例如,以下语句指示 QuickTest 选中 Itinerary 网页上的所有复选框:
Set MyDescription = Description.Create()
MyDescription("html tag").Value = "INPUT"
MyDescription("type").Value = "checkbox"
Set Checkboxes = Browser("Itinerary").Page("Itinerary").ChildObjects(MyDescription)
NoOfChildObjs = Checkboxes.Count
For Counter=0 to NoOfChildObjs-1
Checkboxes(Counter).Set "ON"
Next