Pages

Tuesday, June 21

Message box that will be closed automatically in QTP

Small code to display a message box that will close automatically in the given time without any click.

Dim msg
msg = "This message will automatically close in 10 second"
Set oShell = CreateObject("WScript.Shell")
oShell.Popup msg,10, "QTP School"

In above statement, there are three arguments - 

msg - the content/string of the message box
10 - the time in seconds
"QTP School" - the title of the message box

This is the output of the above code -


8 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi,
    How to close the msgbox contains a runtime value retured from the result of a Checkpoint?
    See the code below:
    Case "vtiger_login_verify_logo_TC003"

    Browser("vtiger CRM - Commercial").Page("vtiger CRM - Commercial").Image("vtiger-crm").Check CheckPoint("vtiger-crm_2")
    retval1=Browser("vtiger CRM - Commercial").Page("vtiger CRM - Commercial").Image("vtiger-crm").Check (CheckPoint("vtiger-crm_2"))
    msgbox retval1
    If retval1= "True" Then
    Datatable.Value("Status",dtglobalsheet)="PASS"
    Datatable.Value("Actual",dtglobalsheet)="Actual Result matched Expected Result"
    else
    Datatable.Value("Status",dtglobalsheet)="FAIL"
    Datatable.Value("Status",dtglobalsheet)="Actual Result did not matched Expected Result"
    End If

    ReplyDelete
  3. How to close msgbox that displays action iteration environment value after each iteration itself?

    ReplyDelete
  4. Great information about QPT and very helpful. Thanks for sharing, Keep updating.

    NO.1 CLOUD SERVICES | Oracle Cloud PAAS | MASSIL TECHNOLOGIES

    ReplyDelete
  5. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking.
    box file

    ReplyDelete
  6. Moving can be overwhelming and costly at the same time. Regardless of financial status, most people would cut down on their moving expenses as much as possible. Being economical as far as materials used will go a long way towards keeping costs down. One of the most expensive parts of the moving process is purchasing moving boxes. Almost all your items will be packed into boxes, with the only exception being big, heavy items such as furniture.view site

    ReplyDelete