|
6#
楼主 |
发表于 2013-9-30 16:54:11
|
只看该作者
回复 candy84528
If xxx("xxxx").xxx("xxx").Exist(1) Then
xxx("xxxx").xxx("xxx").xx ...
黑羽祭 发表于 2013-9-30 15:52
谢谢
自己写了断 为什么一直报错
Dialog("Login").WinEdit("Agent Name:").Set DataTable("username", dtLocalSheet)
Dialog("Login").WinEdit("Password:").SetSecure DataTable("password",dtLocalSheet)
Dialog("Login").WinButton("OK").Click
If Dialog("Login").Dialog("Flight Reservations").Exist(1) THEN
Dialog ("Login").Dialog("Flight Reservations").WinButton("OK").Click
Dialog ("Login").Dialog("Login").WinButton("Cancel").Click
End If
Eorr mesage
The "Flight Reservations" Dialog object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.
Line (4): "If Dialog("Flight Reservations").Exist(5) THEN".
------------------------------------------------------------------------------------------------------
然后网上COPY了个脚本 也报错 为什么呢
Dialog("Login").WinEdit("Agent
Name:").Set DataTable("usename", dtLocalSheet)
Dialog("Login").WinEdit("Password:").Set DataTable("password", dtLocalSheet)
Dialog("Login").WinButton("OK").Click
If Dialog("Login").Dialog("Flight Reservations").Exist(5)
Then
Dim err_message
err_message=Dialog("Login").Dialog("Flight
Reservations").Static("Agent
name
must be at").GetROProperty("text")
Reporter.ReportEventmicFail, "
登录失败
","
错误信息是:
"&err_message
Dialog ("Login").Dialog("Flight Reservations").WinButton("
确定
").Click Dialog("Login").WinButton("Cancel").Click
Else
Reporter.ReportEvent micPass,"登陆成功","登陆成功"
Window("Flight Reservation").Close
End If |
|