For rowNo=0 To rowCount-1
userName = excelUtil.getCellData (rowNo,"Agent Name")
password = excelUtil.getCellData (rowNo,"Password")
status = excelUtil.getCellData (rowNo,"Status")
With Browser("title:="&homeTitle).Page("title:="&homeTitle)
.WebEdit("name:=userName").Set userName
.WebEdit("name:=password").Set password
.Image("name:=login").Click
End With
If Browser("title:=Sign-on: Mercury Tours").Exist(10) and status="Fail" Then
Reporter.ReportEvent micFail,"登录失败: ","登录失败,用户名:"&userName&",密码:"&password
Browser("title:=Sign-on: Mercury Tours").Link("name:=Home").Click
Elseif Browser("title:=Find a Flight: Mercury Tours:").Exist(10) and status="Pass" Then
Reporter.ReportEvent PASS,"登录成功: ","成功"
Browser("title:=Find a Flight: Mercury Tours:").Link("name:=Home").Click
Else
Reporter.ReportEvent Fail,"Login: ","Combination # was not according to Excel file"
End If