Custom Search

Sunday, January 1, 2012

How to close MsgBox at Runtime with QTP

Write the below line as the first-line in your script.
This will create a shell object at run-time and will be available until the test ends. If you are getting problem like, Activex Component can’t create object then use


Set sh = CreateObject(“Scripting.Shell”)

'Where ever you are having “Msgbox” replace it with the following code.
The below line will show the message content for 5 seconds (and vanishes after that).


sh.Popup “message content”, 5, “msg header”, (0+4)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.