|
使用MI自带的例子,执行网页的back操作
操作1:把网页的back操作放到过程中去执行
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "mercury"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "4693368871247064e7e9a553e582bcd0f195ae4d"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 43,4
'Browser("Welcome: Mercury Tours").Dialog("AutoComplete").WinButton("Yes").Click
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Image("findFlights").Click 37,16
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Image("reserveFlights").Click 26,15
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Sync
sub example()
Browser("Welcome: Mercury Tours").Back
End Sub
结果:正常显示Select a Flight页面
操作2:直接执行网页的back操作
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("userName").Set "mercury"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").WebEdit("password").SetSecure "4693368871247064e7e9a553e582bcd0f195ae4d"
Browser("Welcome: Mercury Tours").Page("Welcome: Mercury Tours").Image("Sign-In").Click 43,4
'Browser("Welcome: Mercury Tours").Dialog("AutoComplete").WinButton("Yes").Click
Browser("Welcome: Mercury Tours").Page("Find a Flight: Mercury").Image("findFlights").Click 37,16
Browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").Image("reserveFlights").Click 26,15
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").Sync
Browser("Welcome: Mercury Tours").Back
结果:显示Cannot find server的页面
请问这是为什么? |
|