Wednesday, 29 April 2015

QTP scripts example

QTP scripts example::::::

here is qtp script example for fax order 
qtp online training


Option Explicit
On Error Resume Next
Dim fileObj,filePtrObj,filePtrObj1,actTxt
Set fileObj=CreateObject("Scripting.FileSystemObject")
Set filePtrObj=fileObj.OpenTextFile("D:\sreekar\test data\faxorders.txt",1,True)
Set filePtrObj1=fileObj.OpenTextFile("D:\sreekar\test
data\faxordersresults.txt",2,True)
While filePtrObj.AtEndOfLine<>"True"
        actTxt=filePtrObj.ReadLine
        actTxt=Split(actTxt," ")
        Window("Flight Reservation").Activate
        Window("Flight Reservation").WinMenu("Menu").Select "File;Open Order..."
        If Window("Flight Reservation").Dialog("Open Order").Exist Then
                Window("Flight Reservation").Dialog("Open Order").Activate
                Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order
No.").Set "ON"
                Window("Flight Reservation").Dialog("Open
Order").WinEdit("Edit_2").Set actTxt(3)
                Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
                If Window("Flight Reservation").Dialog("Open Order").Dialog("Flight
Reservations").Exist(2) Then
                        Window("Flight Reservation").Dialog("Open Order").Dialog("Flight
Reservations").WinButton("OK").Click
                        Window("Flight Reservation").Dialog("Open Order").WinButton("Cancel").Click
                        filePtrObj1.WriteLine actTxt(3)&"   order is not found and hence
unable to sent a fax"
                Else
                        Window("Flight Reservation").WinMenu("Menu").Select "File;Fax Order..."
                        If Window("Flight Reservation").Dialog("Fax Order No. 1").Exist Then
                                Window("Flight Reservation").Dialog("Fax Order No.
1").ActiveX("MaskEdBox").Type actTxt(8)
                                Window("Flight Reservation").Dialog("Fax Order No.
1").WinButton("Send").Click
                                If Window("Flight Reservation").Dialog("Fax Order No.
1").Dialog("Flight Reservations").Exist(2) Then
                                        filePtrObj1.WriteLine actTxt(8)&"  fax number is invalid and
hence unable to send a fax for order "&actTxt(3)
                                        Window("Flight Reservation").Dialog("Fax Order No.
1").Dialog("Flight Reservations").WinButton("OK").Click
                                        Window("Flight Reservation").Dialog("Fax Order No.
1").WinButton("Cancel").Click
                                Else
                                        faxDlgExist=Window("Flight Reservation").Dialog("Fax Order No. 1").Exist
                                        While faxDlgExist="True"
                                                faxDlgExist=Window("Flight Reservation").Dialog("Fax Order No.
1").Exist(2)
                                        Wend
                                        faxMsg=Window("Flight Reservation").ActiveX("Threed Panel
Control").GetROProperty("Text")
                                        If faxMsg="Fax Sent Successfully..." Then
                                                filePtrObj1.WriteLine "Fax Sent successfully for the order "&actTxt(3)
                                        Else
                                                filePtrObj1.WriteLine "Fax not Sent successfully for the order "&actTxt(3)
                                        End If
                                End If
                        End If
                End If
        End If

Wend
'killing user defined objects
Set filePtrObj1=Nothing
Set filePtrObj=Nothing
Set fileObj=Nothing


qtp script example, qtp sample script, qtp online training, qtp 10, qtp 10  license key, online training software, software training,

qtp 10 terminology and useful guide

qtp 10 terminology and useful guide:::::

qtp 10:
  

1) Statement / Step / Instruction: A minimal executable unit

Statement is different, Line is different. One Statement might have more than one lines and One Line might have more than one statements.

2) Action: One or more statements to perform a task / tasks

Note: even one meaningful also called an Action

3) Test / Test Script: One or more Actions to perform a task / tasks

Note: In manual Testing the term is Test Case, but in Test Automation Term is Test or Test Script.

4) Test Pane: It is an area where Tests can be generated, viewed and modified.

It is Editor of QTP Tool, user can write Test scripts in this Test Pane

5) Active Screen: It is an area; it captures and holds snapshots for each and every user operation on AUT (Application Under Test)

6) Automation: Accessing software objects from another software

7) Test Automation: Automating Software test process using tools/scripts.

8) Automation Framework: It is a systematic approach to automate software test process.

9) Data Table: It is an integrated spread sheet for Data Driven Testing.

10) Data Driven Testing: Testing the same operation with multiple sets of test data.

11) Parameterization: Passing parameters instead of Constant (Fixed) values.

Note: We can use either variables or constants or Arguments or Environment variable or Dictionary elements as Parameters.

12) Debugging: It is a process of locating and isolating errors through step by step execution.

Note: In case of Test Automation Debugging is optional.

13) Object: It is something which has structure and properties.

14) Run-time object: the object present in the application.

15) Test Object: Reference of Run-time object.

16) Utility Objects: QTP reserved objects, used for Testing and Result Reporting.

17) Data Driver: It is used connect test data to the Test.

18) Object Spy: It is used to get Object information (Properties and values, applicable methods on that Object)

Note: If we load appropriate Add-in only, Object Spy can get Objects Information, otherwise Object spy helpless.

19) VB Script: Visual Basic Scripting Edition (Lightweight version of Micro Soft VB Programming Language).

Note: VB Script was launched in 1997, VB Script engine by default available in Windows 98 and higher versions, and Internet Explorer.

20) QTP: QuickTest Professional, It is a Functional & Regression Test Tool, launched in 2002. It also supports little bit Performance Testing, Compatibility Testing and Reliability Testing. It is an Object based Test tool, based on objects only performs Test operations.

These are mainly based on qtp 10 terminology
in qtp 10 every one has to aware on these terminology
qtp 10, qtp10, qtp crack, qtp vs qc, qtp 10 tutorial, qtp 10 crack, qtp online training,

Online training software in QTP

Online training software in QTP:::::::::


Basically these are the main topics in QTP Online training: 

In software training we have to thorough in these topics.



VBScript in QTP

VBScript Variable

VBScript Arrays

VBScript Functions and Subroutines

VBScript Conditional Statements

VBScript Looping Statements

VBScript Classes

VBScript- Property Let, Property Get, Property Set

Example of VBScript - Property Let, Property Get, Property Set



online training software, software training, software quality assurance training, online software training, training video software,