Friday, 2 August 2013

Explain msgbox function in QTP with example.


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

Best QTP Books

Everything About QTP

Hello Friends,
You can find QTP study material, Multiple choice questions (mcq), QTP question bank, QTP question papers, QTP notes, QTP questionnaire, scenario based QTP interview questions, QTP tutorial and QTP training on this site.

If you are a fresher or experienced QTP professional with (1/2/3/4) years of experience, this blog is just for you.