Computer Science, asked by floramuanding, 6 months ago

What is the use of MSGBOX() ? How is it different from Print statement ?

Answers

Answered by mansajami2020
0

Answer:

MSGBOX(): It's a VBScript function which is used to display the information during run session in the form of pop up. The script execution will be stopped automatically once the MsgBox pop up is displayed. Because the pop up window will not be closed automatically. We may need to close it manually or can have driver script to close the pop up.So, we can't expect that the run session will be completed automatically when used MsgBox.So, when running batch session, we need to make sure that MsgBox function is not used in our script.

Most of us might have came across the function MsgBox which is used to display the variable values,text values etc., during our script execution. But from QTP 9.x series HP has introduced a statement called "Print". The purpose of the Print statement is similar to the MsgBox.

Print: Print statement is used to print the information in a print log during run session and it'll not affect the script execution. It means that the Print log will be printed along with the run session.So, while running the batch session we can use Print statement which will not pause the script execution.

Print: Print statement is used to print the information in a print log during run session and it'll not affect the script execution. It means that the Print log will be printed along with the run session.So, while running the batch session we can use Print statement which will not pause the script execution.Syntax: Print "<<msg>>" & <<variable name>>

Print: Print statement is used to print the information in a print log during run session and it'll not affect the script execution. It means that the Print log will be printed along with the run session.So, while running the batch session we can use Print statement which will not pause the script execution.Syntax: Print "<<msg>>" & <<variable name>>Ex: Print "User Name is :"& Uname

Similar questions