QTP Test Automation

Last Comment

How to get the Browser window ...

2008-11-20 @ 12:41:11 pm
by venugopal


there are many problems we will ...

2008-07-16 @ 03:58:49 pm
by Ramu


what r the challenges have faced ...

2008-07-15 @ 10:57:24 am
by veerachary


attached the answers of the above ...

2008-07-10 @ 04:38:52 pm
by Ramu


Can you please provide the answers ...

2008-07-10 @ 04:07:58 pm
by chakri


Calendar

November 2009
SunMonTueWedThuFriSat
 << <Feb 2012> >>
 123456
78910111213
14151617181920
21222324252627
282930    

Announce

Who's Online?

Member: 0
Visitor: 1

rss Syndication

Choose a skin



Links

    Posts sent on: 2001-01-01

    15 Jul 2008 
    Use the following code to capture screenshot of the browser and to place the file in a seperate location

    ----------------------------------------------------------------------------
    Browser("title:=TNSInfo Login").Page("title:=TNSInfo Login").WebEdit("name:=password").Set "Palanki"
    Browser("title:=TNSInfo Login").CaptureBitmap "C:\New.bmp",True
    Ramu · 157 views · 0 comments
    Categories: Capute StatusText
    11 Jul 2008 
    how test matrix can be done?


    gowrishanker · 687 views · 2 comments
    10 Jul 2008 



    We can capture the StatusText of the Browser with the following script

    msgbox Browser("title:=Gmail").Object.StatusText


    Ramu · 112 views · 0 comments
    Categories: Capute StatusText
    10 Jul 2008 

    Following script will be useful to highlight the data available in the Web application textbox.

    Set WshShell = CreateObject("WScript.Shell")
    wait(1)
    Browser("info").Page("info").WebEdit("uname").Set "Ramu"
    wait(1)
    Browser("info").Page("info").WebEdit("uname").FireEvent "onfocus"
    WshShell.Sendkeys "^a"


    Ramu · 88 views · 0 comments
    10 Jul 2008 
    Following statements will helps you to send mail automatically through QTP.
    For that you need to have a MS Outlook with mail server connected to it in your machine

    Dim objOutlookMsg
    Set objOutlook = CreateObject("Outlook.Application")
    Set objOutlookMsg = objOutlook.CreateItem(0)
    objOutlookMsg.To = "ramu.palanki@gmail.com"
    objOutlookMsg.BCC ="ramu.palanki@gmail.com"
    objOutlookMsg.Subject = "Sending Mail through QTP Script"
    objOutlookMsg.Body ="Hello QTP"
    objOutlookMsg.Attachments.Add("C:\Result.html")
    objOutlookMsg.Send


    Ramu · 108 views · 0 comments
    Categories: Working on Outlook
    10 Jul 2008 
    Following script will create an Excel file and types some value(Hello) and saves it in C Drive

    Below code will be helpful for creating  and closing excel sheet

    Dim xlApp
    Dim xlBook
    Dim xlSheet

    Set xlApp=CreateObject("Excel.Application")
    Set xlBook=xlApp.workbooks.add
    Set xlSheet=xlBook.activesheet
    xlSheet.cells(1,1)="helloo"


    xlBook.saveas "C:\test.xls"
    xlApp.quit

    Ramu · 118 views · 0 comments
    Categories: Excel Object
    10 Jul 2008 

    If Browser ("micClass: =Browser","index: =0").Exist (0) Then             
        Browser ("micClass: =Browser","index: =0").Close
    With the above statement, we can close all the opened browesers in the desktop



    Ramu · 44 views · 0 comments
    10 Jul 2008 

    Reporter Object is used for sending information to the test results. With the help of this object you can:

    • Report the status of test results (like pass, fail, warning)
    • Enable/Disable reporting of step(s) following the statement.
    • Retrieve the folder path in which the current test's results are stored.
    • Retrieve the run status at the current point of the run session.

    There are some very important methods and properties associated with it.

    ReporterEvent Method:

    I think this is a very common method used with Reporter object. I am sure even if you have worked on QTP for a relatively short period, you would have come across this.

    Its syntax:

    Reporter.ReportEvent EventStatus, ReportStepName, Details

    where EventStatus can be:

    0 or micPass: If this step runs test passes which is shown in test report.

    1 or micFail: If this step runs test fails which is shown in test report.

    2 or micDone: Used to send message to the test report and does not affect status of test.

    3 or micWarning: Again, used to send warning message to the test report and does not affect status of test.

    and

    ReportStepName is name of step

    and

    Details are the user defined details for the given step.

    For Example:

    Reporter.ReportEvent micPass, "Login Authorization", "The user-defined step passed."

    Filter property

    There can be situations where you don't want the full status displayed on the test report. This property can be used to selectively filter the status of your tests.

    Its syntax:

    Reporter.Filter = NewMode

    where NewMode can be:

    0 or rfEnableAll: This is the default mode. All reported events are displayed in the Test Results.

    1 or rfEnableErrorsAndWarnings: Only those events with a warning or fail status are displayed in the Test Results.

    2 or rfEnableErrorsOnly: Only those events with a fail status are displayed in the Test Results.

    3 or rfDisableAll: All events in the Test Results are disabled.


    ReportPath Property

    This is used to get the path in which current test results are stored.

    Its syntax:

    Path_of_Results = Reporter.ReportPath

    RunStatus Property

    This is used to get the current status of the run session

    Its syntax:

    Reporter.RunStatus

    For Example:

    if Reporter.RunStatus = 0 then flag=1;


    Ramu · 84 views · 0 comments
    Categories: Reporter Object
    10 Jul 2008 
    what is smart identification technique?

    · 72 views · 0 comments
    Categories: Object identification
    10 Jul 2008 
    How can we identify Browser? I mean with which properties?

    · 223 views · 1 comment

    Previous page  1, 2, 3  Next page