我是了一下这个方法:
Dim Text
Text=Window("XXX").WinObject("SWT_Window0").GetVisibleText()
if Text<>"保存成功" then
Reporter.ReportEvent micFail,"保存失败","保存失败!"
else
Reporter.ReportEvent micPass,"保存成功","保存成功!"
如下面
Dim Text
Text=Window("XXX").WinObject("SWT_Window0").exist(10)
if Text then
Reporter.ReportEvent micFail,"保存失败","保存失败!"
else
Reporter.ReportEvent micPass,"保存成功","保存成功!"
Dim Text
For I = 1 To 10
Text=Window("XXX").WinObject("SWT_Window0").GetROProperty("text")
If Text =="" then
wait(3)
ElseIf Text=="保存成功" then
Reporter.ReportEvent micPass,"保存成功","保存成功!"
Exit for
Else
Reporter.ReportEvent micFail,"保存失败","保存失败!"
End If
If I=10 Then
Reporter.ReportEvent micFail,"保存失败","保存失败!"
End If
Next