|
初学QTP,完全按照QuickTest Professional 教程帮助的实例进行,设置了输出值,同时创建表检查点并将检查点参数化为输出值,在进行创建输出值的测试时,总是测试结果失败,并没有将输出值插入到检查点中,脚本如下:
红色部分创建了输出值,而发现蓝色部分的脚本没有将表检查点设置的参数生效,没有改变。请赐教
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "lingb0719"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "48cc78d7c0e4355f647469b80360bad4b1dd4b73dd73d15f"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 16,3
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromPort").Select DataTable("DepartFrom", dtGlobalSheet)
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromMonth").Select "October"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("fromDay").Select "10"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toPort").Select "San Francisco"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toMonth").Select "October"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebList("toDay").Select "14"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").WebRadioGroup("servClass").Select "Business"
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Image("findFlights").Click 49,8
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Output CheckPoint("271")
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Output CheckPoint("Blue Skies Airlines 361")
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("outFlight").Select "Blue Skies Airlines$361$271$7:10"
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Output CheckPoint("273")
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Output CheckPoint("Blue Skies Airlines 631")
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("inFlight").Select "Blue Skies Airlines$631$273$14:30"
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Image("reserveFlights").Click 67,4
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Check CheckPoint("Book a Flight: Mercury")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebTable("New York to San Francisco").Check CheckPoint("New York to San Francisco_2")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst0").Set "lin"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passFirst0").Check CheckPoint("passFirst0_2")
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("passLast0").Set "gaibiao"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebEdit("creditnumber").Set "1122334455667788"
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Image("buyFlights").Click 85,7
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Check CheckPoint("New York")
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Check CheckPoint("New York_2")
Browser("Welcome: Mercury Tours").Page("Flight Confirmation: Mercury").Image("home").Click
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours_2").Sync
Browser("Welcome: Mercury Tours").Close
[ 本帖最后由 lingb 于 2008-9-14 14:18 编辑 ] |
|