HP, QTP, QTP Code, QTP Interview Questions, Testing, Tools, UFT

Using Message Box That Close Automatically in HP UFT (QTP)

In this blog post, I would like to how to display message box that close automatically in HP UFT (QTP).

The function below shows a message box that disappears after the specified timeout (in seconds). The script execution then continues.

Call AutoMsgBox("Message Box that closes after 5 seconds - Demo","Message Box Demo - QAInsights",5)
Public Sub AutoMsgBox(Text, Title, TimeOut)
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Popup Text, TimeOut, Title
End Sub

If TimeOut = 0, it behaves just like a normal message box. If TimeOut > 0, the dialog box disappears after the specified number of seconds.

[auto_thumb width=”150″ height=”150″ link=”” lightbox=”true” align=”center” title=”Using Message Box That Close Automatically in HP UFT (QTP) – QAInsights” alt=”Using Message Box That Close Automatically in HP UFT (QTP) – QAInsights” iframe=”false” frame=”true” crop=”true”]http://qainsights.com/wp-content/uploads/2013/07/Using-Message-Box-That-Close-Automatically-in-HP-UFT-QTP.jpg[/auto_thumb]

Thanks for visiting QAInsights! Check out our new portal Testifications.com to get updates on Software Testing related certifications. We’re always posting interesting articles on QAInsights. I request you to subscribe so you don’t miss out anything. Searching for QA Jobs Openings, check it at www.QAJobOpenings.com

Want to start a blog like this, please visit SpidyDomain to buy cheap web hosting and register domain.

Subscribe to our QAInsights YouTube Channel | Subscribe our free weekly newsletter.


Once a week we send a digest with the most popular articles.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Check out my latest Udemy course `Performance Testing using TruWeb` - Use QAINSIGHTS2018 coupon for 25% off BUY NOW