Forum Discussion
I am questioning if using another method would provide different results, but it's worth a try I suppose?
I believe you are using VBScript?
Try this:
Dim strCaption
strCaption = Aliases.prowin.dlgMessage.Static.WndCaption
If strCaption <> Driver.Value(2) Then
Log.Warning("Property value " & strCaption & " does not match data value " & Driver.Value(2))
End If
prowin.dlgMessage.btnOK.ClickButton
loginMainWin.Close
prowin.wndProMainWin3.Close
I need to show whether a test is passed or failed. So I believe Either we can use property checkpoint or Log.Error method to show the error. In both case I am not able to close the popupbox and application after an error appears.
Following is code:-
strCaption = Aliases.prowin.dlgMessage.Static.WndCaption
If strCaption <> Driver.Value(2) Then
Log.Error("Property value " & strCaption & " does not match data value " & Driver.Value(2))
End If
prowin.dlgMessage.btnOK.ClickButton
loginMainWin.Close
prowin.wndProMainWin3.Close
Please suggest
- tristaanogre10 years agoEsteemed Contributor
Question: When you say the check fails, is there an error message? If so, what is it?
My suspicion: The code seems to be fine. However, it is possible that the object that you are trying to get the WndCaption property from might not exist in real time at the time you are making the check. There may be a delay in when the object appears in which point you are trying to check the property of a non-existent object. Try using a WaitAlias method in your code to retrieve your object and then do a check to see if the object exists before proceeding to the next part of your code.