|
LZ,按照你的需求,我已经做好了,以下是code:
dialog("Login").WinEdit("Agent Name:").Set DataTable("userName", dtGlobalSheet)
dialog("Login").WinEdit("Password:").Set DataTable("password", dtGlobalSheet)
dialog("Login").WinButton("OK").Click
var_userName=DataTable("userName",dtGlobalSheet)
var_password=DataTable("password",dtGlobalSheet)
If dialog("Login").Dialog("Flight Reservations").Exist Then
reporter.ReportEvent micFail,"logon error","wrong username or psw"
dialog("Login").Dialog("Flight Reservations").WinButton("OK").Click
else
reporter.ReportEvent micDone,"logon success","logon successfully"
Window("Flight Reservation").WinMenu("Menu").Select ("File;Exit")
reporter.ReportEvent micPass,"Validating Data","Logon success for userName:"&var_userName&" and password:"&var_password
End If |
|