When you want to display some information to user, you can use msgbox function. This is useful when you are debugging your QTP script.
Msgbox function has below syntax.
MsgBox(Message_To_Display,buttons_to_display,titletodisplay , helpfile, context)
msgbox now
'Above line will display current system time with ok button.
str = msgbox ("hi",4)
'Above line will display hi with yes and no button.
If str = 6 Then
print "yes:"
else
print "no"
End If
'If user presses yes button, it will print yes else it will print no.
Second Parameter -> buttons_to_display - determines which buttons to display.
third parameter -> titletodisplay -> is the title of window.
Last 2 parameters are used for showing help to the user.
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts.
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs