07-20-2012, 11:37 AM
Yes sure you can just capture the message in the error dialog box if they are application related pop ups.
Use the code
Above code will work only for application related popups, if you want to work on the QTP error popup, u'll have to use On Error resume next statement. You can chk for the error number there as a condition.
Regards,
Ankesh
Use the code
Code:
strMsg=Browser("").Page("").Dialog("").GetRoProperty("PopupDialogText") 'get the txt displayed,chnge the objecthierarcrhy as per ur need.
if Instr(strMsg,"<Your Message that you want to chk>")>0 Then
//your code to perform operation if the msg is as expected
End IF
Above code will work only for application related popups, if you want to work on the QTP error popup, u'll have to use On Error resume next statement. You can chk for the error number there as a condition.
Regards,
Ankesh