Wednesday, December 2, 2009

38. Explanation for the Keyword scripts:

ð First add the sheets in the Runtime Datatable.

Datatable.addsheet”Module”
Datatable.addsheet”Testcase”
Datatable.addsheet”Teststep”

ð Delete the Global Sheet and Action 1 Sheet.
Datatable.deletesheet(1)

ð Import the data from external excel sheet.
Datatable.importsheet” path of the excel sheet file”

ð Count number of rows in the module sheet.
Mod_rc=datatable.getsheet(1).getrowcount

ð Number of iterations.
For i=1 to mod_rc
Datatable.setcurrentrow(i)

ð To displaying number of rows in the mod_rc.
Msgbox mod_rc

ð Specifying the location of modexe value in 3rd column and first sheet.
Modexe=datatable.value(3,1)

ð If condition is true, module id will be stored in the modid.
If modexe=”Y” then
Modid=datatable(1,1)
(end of first sheet code)

ð Count number of rows in the test case sheet.
Tc_rc=datatable.getsheet(1).getrowcount

ð Number of iterations.
For j=1 to tc_rc
Datatable.setcurrentrow(j)

ð If condition is true, tcid will be stored in the tcid.
Tcmodid=datatable(5,2)
Tcexe=datatable(3,2)
If tcmodid=modid and tcexe=”Y” then
Tcid=datatable(1,2)
Msgbox tcid
(end of second sheet code)

ð Counting number of rows in the test steps sheet and storing number of rows in ts_rc variable.
Ts_rc=datatable.getsheet(3).getrowcount
Msgbox ts_rc
(displaying number of test steps)

ð Number of iterations.
For k=1 to ts_rc
Datatable.setcurrentrow(k)

ð Specifying the location of modexe value in 3rd column and first sheet.
Tstcid=datatable(5,3)

ð If condition is true keyword will be selected.
If tcid=tstcid then
Keyword=datatable(3,3)
(specifying the location of keyword)
Msgbox keyword

ð Selecting the keyword.
Select case keyword

ð Case is openapp it will call launchapp function.
Case “openapp”
Call launchapp(strur 1)

ð Case is adminlogin it will call adminlogin function.
Case”adminlogin”
Call adminlogin(str_uid,str_pwd)
Click to add text

ð Adminlogin function case “adminlogin” call
Admin (str_uid,str_pwd)
Click to add text

ð You add all the cases in the application.
And call respective functions.

37. Keyword Driven Testing:

Step 1: Open the Excel sheet and modify the Sheet 1 as Module, Sheet 2 as Test Case and Sheet 3 as Test Step.
Step 2: In Module sheet enter the Template as Moduleid, Modulename and Moduleexecution and enter all the values in the templates.
Step 3: In the Test Case sheet enter the Template as Testcaseid, Testcasedescription, Testcaseexecution, and Moduleid and enter all the values in the templates.
Step 4: In Test Step sheet enter the Templates as Teststepid, Functionname, Keyword, and Testcaseid and enter value in all the Templates.
Step 5: Save the Excel sheet as .xls.
Step 6: Open the Test in the Qtp.
Step 7: Enter the Script as

E.g:
Nextdatatable.AddSheet"module1"
datatable.AddSheet"testcase1"
datatable.AddSheet"teststep1"
datatable.ImportSheet"C:\Documents and Settings\arcus infotech\Desktop\key.xls","module","module1"
datatable.ImportSheet"C:\Documents and Settings\arcus infotech\Desktop\key.xls","testcase","testcase1"
datatable.ImportSheet"C:\Documents and Settings\arcus infotech\Desktop\key.xls","teststep","teststep1"
mcount=DataTable.GetSheet("module1").getrowcount
For i=1 to mcount
DataTable.SetCurrentRow(i)
mexec=DataTable.Value("moduleexecution","module1")
If mexec="Y" Then
modid=DataTable.Value("moduleid","module1")
MsgBox modid
tccount=DataTable.GetSheet("testcase1").getrowcount
For j=1 to tccount
DataTable.SetCurrentRow(j)
tcexec=DataTable.Value("testcaseexecution","testcase1")
modid1=DataTable.Value("moduleid","testcase1")
If modid1=modid and tcexec="Y" Then
tcid=DataTable.Value("testcaseid","testcas MsgBox tcid
tscount=DataTable.GetSheet("teststep1").getrowcount
For k=1 to tscount
DataTable.SetCurrentRow(k)
tcid1=DataTable.Value("testcaseid","teststep1")
If tcid1=tcid then
keyword=DataTable.Value("keyword","teststep1")
MsgBox keyword
Select Case keyword
Case "la"
Call la
Case "lo"
Call lo
Case "clo"
Call clo
Case "la1"
Call la1
Case "lo1"
Call lo1
Case "fr"
Call fr
Case "capp"
Call capp
End Select
End if
Next
End If
Next
End If
Step 8: Create a New Function Library Page by using File>New>Function Library.
Step 9: Shortkut Key to open Library page is Shift+Alt+N.
Step 10: In the Library page Enter the Function Syntax and its Script like this.

E.g:
Function la
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
End Function

Function lo
Dialog("Login").WinEdit("Agent Name:").Set "sdfgsdfg"
Dialog("Login").WinEdit("Password:").SetSecure "4ae135406e68f334ebd94cbccf67f62f249df683"
End Function

Function clo
Dialog("Login").WinButton("Cancel").Click
End Function

Function la1
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
End Function

Function lo1
Dialog("Login").WinEdit("Agent Name:").Set "sdfgsdfg"
Dialog("Login").WinEdit("Password:").SetSecure "4ae135406e68f334ebd94cbccf67f62f249df683"
Dialog("Login").WinButton("OK").Click
End Function

Function fr
Window("Flight Reservation").ActiveX("MaskEdBox").Type "111111"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Frankfurt"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Paris"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "fsdgsdfgs"
Window("Flight Reservation").WinButton("Insert Order").Click
End Function

Function capp
Window("Flight Reservation").Close
End Function

Step 11: Save the Function Library Page.
Step 12: Now we want to link the Function Library Page with the Test Page in the Qtp by File>Settings>Resources.
Step 13: Test Settings dialog box appears. Click on + symbol to browse the Saved Library file.
Step 14: After the browsing the library file click on Ok.
Step 15: Execute the Script to analyse the Result.

36. Descriptive Programming:

It is nothing but a technique using which operations can be performed on the AUT object. Which are not present in the Object Repository.
There are two Types of Descriptive Programming.
1. Static Descriptive Programming.
2. Dynamic Descriptive Programming.


36.1. Static Descriptive Programming:
We provide the set of properties and values, which describes the object, directly.
Step 1: Open the Test in the Qtp.
Step 2: Open the application that you want to write the Script.
Step 3: Identify the properties for the applications option by using Object Spy.
Step 4: Enter the script as, this below Example uses Descriptive Programming to open Flight Application and does not use object Repository at all. So one of the other advantage is you can copy this script and run this from any other machine (other that on which it was created) and it is supposed to work fine.
E.g: Dialog(“text:=Login”).winedit(“attached text:=Agent Name:”).set “Arcus”
Dialog(“text:=Login”).winedit(“attached text:=Password:”).set ”mercury”
Dialog(“text:=Login”).winbutton(“text:=OK”).click
Step 5: Execute the script to analyse the Result.

36.2. Dynamic Descriptive Programming:
Step 1: Open the test in QTP.
Step 2: open the application that you want to write the Script.
Step 3: Identify the properties for the applications option by using Object Spy.
Step 4: Enter the script as, This below Example uses Descriptive Programming to open Flight Application and does not use object Repository at all. So one of the other advantage is you can copy this script and run this from any other machine (other that on which it was created) and it is supposed to work fine.
Step 5: Enter the Script as
Set dianame=Description. create
Dianame(“text”).value=”Login”
Set agname=Description.create
Agname(“attached text”).value=”Agent Name:”
Set pwd=Description.create
Pwd(“attached text”).value=”Password:”
Set but=Description. create
But(“text”).value=”OK”
Dialog(dianame).winedit(agname).set”Arcus”
Dialog(dianame).winedit(pwd).set”mercury”
Dialog(dianame).winbutton(but).click
Step 6: Execute the Script and analyze the Result.

35. Flat Files:

It is another method to apply the multiple no of inputs to the Script through the Notepad.
Step 1: Open the Notepad, and Enter all the Templates and Inputs for the Templates that you want to apply the input for Script.
Step 2: Save the notepad as .txt.
Step 3: Open the Test in Qtp.
Step 4: Enter the Script as
E.g.: Set fso=createobject ("scripting.filesystemobject")
Set f=fso.opentextfile (" ", 1)
f.skipline
While f.atendofline<>true
s=f.readline
arr=split (s," ")
Dialog ("Login").WinEdit ("Agent Name :") .Set arr (0)
Dialog ("Login").WinEdit ("Password :") .Set arr (1)
Wend
Step 5: Execute the Script to analyze the Result.

34. Database Connections:

We can connect to database & update data & Read data from database using Below Classes.
1. Adobd.Connection: we can use this class to establish the connection to the database.
2. Adodb.Command: we can use this class to execute any SQL statement like Insert, Update and delete Commands.
3. Adobd.Recordset: we can use this class to select the record from database.
By using Database connection we are applying the Multiple no of inputs to the Script.
We can apply the input by 3 ways.
· MS-Access.
· SQL Server.
· Oracle.


34.1. MS-Access:
By using MS-Access we are applying the multiple no of Inputs to check the functionality.
Step 1: Open the MS-Access.
Step 2: Create the Database by clicking on the New Button option in the Menu Bar.
Step 3: Select Blank Database at Right side of the MS-Access.
Step 4: File New Database dialog box opens, in the File Name field just enter the Database Name and click on Create.
Step 5: Database (Access 2000 file format ) dialog box opens.
Step 6: In that dialog box Double click on Create table by Entering Data to create a new data table in the database.
Step 7: Now Data Table opens, In the Field Row just Enter the Template name e.g. AgentName and Password.
Step 8: Then Enter the multiple number of inputs in the Table.
Step 9: Save the Table, and close the Database.
Step 10: Open the Test in the QTP.
Step 11: Enter the script as


E.g.: Set con=createobject ("adodb.connection")
Set rs=createobject ("adodb.recordset")
con.open "provider=microsoft.jet.oledb.4.0; data source=""
rs.open"select * from orders", con
While rs.EOF<>true
Dialog ("Login").WinEdit ("Agent Name :") .Set rs ("agent name")
Dialog ("Login").WinEdit ("Password :") .Set rs ("password")
rs.movenext
Wend

Step 12: Execute the Script to Analyse the Result.


34.2. SQL Server:
Through the SQL Server we are applying the multiple no of inputs for the application.
Step 1: Open the SQL Server.
Step 2: Create the Database and Create the Data table.
Step 3: Enter all the Templates and Inputs in the Data table.
Step 4: Open the Test in QTP.
Step 5: Enter the Script as


E.g.: Set con=createobject ("adodb.connection")
Set rs=createobject ("adodb.recordset")
con.open"provider=sqloledb.1; server= ; uid= ; pwd= ; database= "
rs.open"select * from orders", con
While rs.EOF<>true
Dialog ("Login").WinEdit ("Agent Name :") .Set rs ("agent name")
Dialog ("Login").WinEdit ("Password :") .Set rs ("password")
rs.movenext
Wend

Step 6: Execute the Script to analyse the Result.


34.3. Oracle:
Through the Oracle applying the multiple no of inputs for the application.
Step 1: Open the Oracle
Step 2: Create the Database and Create the Data table.
Step 3: Enter all the Templates and Inputs in the Data table.
Step 4: Open the Test in QTP.
Step 5: Enter the Script as


E.g.: Set con=createobject ("adodb.connection")
Set rs=createobject ("adodb.recordset")
con.open"provider=oraoledb.1; server= ; uid= ; pwd= ; database= "
rs.open"select * from orders", con
While rs.EOF<>true
Dialog ("Login").WinEdit ("Agent Name :") .Set rs ("agent name")
Dialog ("Login").WinEdit ("Password :") .Set rs ("password")
rs.movenext
wend

Step 6: Execute the Script to analyse the Result.

33. Data Driven Testing:

· Data table Method.
· Environment Variable.
· Random Numbers.
33.1. Environmental Variable:
When we want to use the same variable in different actions then we can use envionment variables we can load the set of environment variables from a XML file directly


33.1.1. Types of Environmental Variable:
· User-Defined Internal.
· User-Defined External.
· Built-in.


a. Build-In Variables:
Build-in variables are the name suggests are predefined by QTP. Examples of such variables are OS, OS Version, ActionName which are for Operating System, Operating System Version and Name of the action which is currently running, respectively.
Step 1: Open a new test.
Step 2: Go to the File (Menu)>Settings, a Test settings window opens.
Step 3: Go to the Environment Tab. By default Built-in variable type is selected and you will be able to see Name and Description of the Build-in variables below variable type Dropdown box.
Step 4: You can click on any of those variables to see their current value.
Step 5: Now close the Test Settings window and go to test.
Step 6: In the Expert view type:
a=Environment (“actionname”) & “is running on” & environment (“OS”)
msgbox (a)
Step 7: Run the Test.


b. User Defined Internal:
User Defined Internal variables are the variables defined by you ( the user) within the test and which are saved within the test and also accessible from within the test.
Step 1: Open a new test.
Step 2: Go to File menu> Settings, a Test Settings window opens.
Step 3: Go the Environment Tab. From Variable Type dropdown select User- Defined.
Step 4: Click on the ‘+’ which is on the right of Variable Type dropdown.
Step 5: Add New Environment Parameter’ window opens up, type the Name and Value of the Variable e.g. in Name type ‘Agentname’ and in Value type ‘arcus’ (without quotes, I have added quotes just for clarity) and click on OK. It will add the variable with its type as ‘internal’.
Step 6: Click Apply and OK to come out of the Test Settings window.
Step 7: Open the Test in QTP, and Enter the script as
E.g.: lv_agentname=Environment.Value ("agentname")
lv_password=Environment.Value ("password")
systemutil.Run"C:\Program Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
Dialog ("Login").WinEdit ("Agent Name :") .Set lv_agentname
Dialog ("Login").WinEdit ("Password :") .Set lv_password
Dialog ("Login").WinButton ("Cancel").Click
Step 8: Execute the Script and analyse the Result.


c. User Defined External:
User Defined External Avriables are the variables which are defined in the file outside of test. These act as read only for the test. You can create as many files for environment variables as you want and choose them for your test.
Step 1: Open a new NotePad .
Step 2: Enter the Value as


Agentname
arcus


And save this notepad as .xml file.
Step 3: Open the New Test in the QTP.
Step 4: Go to File menu> Settings, a Test Settings window opens.
Step 5: Go the Environment Tab. From Variable Type dropdown select User- Defined.
Step 6: Click on “load Variables and values from external file “ check box and import the external xml file that we created above. As soon as it is imported the complete path of that file will be shown in the File text box and the variables in it will show under Name, Value and Type heading (in our case it will show Agentname under Name, arcus under Value, and External under Type).
Step 7: Click on Apply and Ok to come out of it.
Step 8: Open the test in the QTP, and type Script as
Environment.LoadFromFile”Enter the path of the Xml file you saved”
lv_agentname=Environment.Value ("agentname")
lv_password=Environment.Value ("password")
systemutil.Run"C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
dialog("Login").WinEdit("Agent Name:").Set lv_agentname
dialog("Login").WinEdit("Password:").Set lv_password
dialog("Login").WinButton("Cancel").Click
Step 9: Execute the Script and Analyze the Result.


33.2. Data Table Method:
By using the Data Table method we are Checking the Functionality for the application with Multiple number of inputs.
There are two types of Data Table Testing.
· Internal Data Table Testing.
· External Data Table Testing.

a. Internal Data Table Testing:
It is nothing but just applying the multiple number of inputs through the Defined Time Data Table in the Qtp.
Step 1: Enter all the Scripts for the Application in the Expert View.
Step 2: Go to the Keyword View and Parameterize the Templates and Its Values to the Defined Time Datatable.
Step 3: Through the Defined Time Data Table just apply the Multiple No of Inputs.
Step 4: Execute the Script to analyse the Result.


b. External Data Table Testing:
It is nothing but just applying the multiple number of inputs through the External File i.e. Excel Sheet.
Step 1: Open the Excel sheet, and enter the Templates and its Value that you want to check the functionality of the application.
e.g. agentname and its value, and Password and its value.
Step 2: Save the Excel Sheet as .xls.
Step 3: Open the Test in the QTP.
Step 4: Enter the Script as
E.g.: datatable.AddSheet"Arcus"
datatable.ImportSheet"path","Name of the Sheet in Excel","Arcus"
rc=datatable.GetSheet("Arcus").getrowcount
msgbox rc
For i=1 to rc
datatable.SetCurrentRow (i)
dialog("Login").WinEdit("AgentName:").Setdatatable.Value("agentname","roles")
dialog("Login").WinEdit("Password:").Setdatatable.Value("password","roles")
Dialog (“Login”).WinButton (“Cancel”).click
Next
Step 5: Execute the Script two analyze the Result.

32. Breakpoint:

Breakpoint instruct Quick test to pause a run session at a predetermined place in a test or function library and quick test pauses the run (a breakpoint) before executing the step.
You can
· Examine the effects of the run up to the breakpoint.
· Make any necessary changes.
· Continue running the test or function library from the breakpoint.
· Suspend a run session and inspect the state of your application.
· Make a point which to begin stepping through a test or function library using the step commands.
You can set breakpoints.
You can temporarily enable and disable breakpoints.
After you finish you breakpoints, you can remove breakpoints from your test or library function.
Breakpoints are applicable only to the current Quick test session and are not saved with your test or function library.


32.1. Insert Breakpoint/Remove Breakpoint:
You can easily insert and remove breakpoints in the Keyword View. When you place a breakpoint in a step in the Keyword View, it is also displayed in the Expert View, and vice versa.
You insert a breakpoint in the Keyword View by clicking in the left margin at the point where you want to insert the breakpoint, or by selecting a step and pressing F9, or choosing
Step 1: Generate the Script for the Application.
Step 2: Debug > Insert/Remove Breakpoint.
Step 3: Red breakpoint icon is displayed.
Step 4: You can remove a breakpoint by clicking the breakpoint icon, or by selecting a step and pressing F9 or choosing. Debug > Insert/Remove Breakpoint.
Step 5: Execute the Script to see the Result.

31. Object Identification:


You can view and modify the object class properties in the Object Identification dialog box.
Use the Object Identification dialog box to:
. View the mandatory and assistive properties of an object class.
. Modify the mandatory and assistive properties of an object class.
. .Select the ordinal identifier for an object class.
. Create a user-Defined object class.
. Reset the properties of an object class.
. Quick test has a predefined set of properties that it learns for each test object. You use the object Identification dialog box to view and modify the predefined set of properties of all object classes.


31.1. To open the Object Identification dialog box:
Step 1: From the Quick test professional menu bar, select Tools>Object Identification.
Step 2: Object Identification dialog box appears.
In the Object Identification dialog box, from the Test Object Classes list, select the object class whose properties you want to view.

31.2. Identifying Types of Object Class Properties:
An application uses multiple instances of an object class. For Example, the flight Reservation application uses the Fly From and Fly To Combo box, which are objects of the WinComboBox object class.
Quick test Professional assigns a set of mandatory and assistive properties to the Wincombobox object class to help the class recognize the combo box. These properties help create a unique description of each object in an object class.
Mandatory properties are the properties that Quick Test always recognizes for a test object class. Quick Test recognizes assistice properties if the mandatory properties are not sufficient to create description for an object in an object class.
In the flight Reservation application, the Attached Text property uniquely identifies the object of the Win Combo box object class. Therefore, Quick Test assigns the Attached Text property as a mandatory property to the Win Combo box object class. However, there may be instances of applications where the attached text may be the same for different combo box. In such case, Quick test assigns additional mandatory and assistive properties to create a unique description of an object.
Step 3: In the Object Identification dialog box, below the Mandatory Properties list, click Add/Remove.
Step 4: in the Add/Remove Properties dialog box, clear the properties that you do not require and check the properties that you require.
Step 5: If the available property are not sufficient, click New to create a new property.
Step 6: In the Name Property dialog box, in the New Property Name field, type a name for the property, and click Ok.
Step 7: Click on Ok to close the Add/Remove Properties dialog box and apply the new properties to the object class.


Note: You can modify the assistive properties of an object class in a similar manner.


Step 8: Quick test uses an Ordinal Identifier to identify an object if the mandatory and assistive properties are insufficient to identify the object. You select the Ordinal Identifier as Location Or Index from the Ordinal Identifier list in the Object Identification dialog box.
BY default, the location of an object is used as an ordinal identifier to identify an object.


Note: when you run a test, Quick Test searches for an object based on the description it learned for the object. If Quick test cannot find any object that matches the description, or if it finds multiple objects that match, Quick Test uses the Smart Identification feature to identify the object.


31.3. To modify the Smart Identification Properties:
Step 9:
In the Object Identification dialog box, click Configure. The Smart Identification Properties-Browser dialog box appears. The Smart Identification Properties-Browser dialog box displays the Base Filter Properties and Optional Filter Properties lists for an object class.
Step 10: Click Add/Remove to modify a property.
Step 11: Click on Ok in the Object Identification dialog box.
Step 12: After you modify the Smart Identification properties and update a test, you run the test and view the test result.

30. Parameterization:


We can parameterize the value by two methods
1. Parameterize through Data Driver Wizard.
2. Parameterize through the Keyword View.


30.1. Parameterize Through Data Driver Wizard:
The Data Driver enables you to quickly parameterize several (or all) property values for test objects, checkpoints, and/or method arguments containing the same constant value within a given action.
(Or)
Data Driver Wizard is used to convert the Templates and it’s Input from the Script to the Data table (Designed Time Data Table).


To parameterize a value using the Data Driver:
Step 1:
Generate the Script by Using the Record Button for Particular application.
Step 2: Choose Tools > Data Driver.
Quick Test scans the test for constants before the Data Driver opens (this may take a few moments).


Note: If the action being scanned contains a large number of lines and constant values, Quick Test warns you that loading the constants may take some time. You can choose whether to wait for the constants to load, or to open the Data Driver wizard quickly without constants.
The Data Driver displays the Constants list for the action. For each constant value, it displays the number of times the constant value appears in the action.


Step 3: If you want to parameterize a value that is not currently displayed in the list (such as an object property value), click Add Value. The Add Value dialog box opens.
Enter a constant value in the dialog box and click Add. The constant is added to the list.


Note: You can add only constant values that currently exist in the test action.


Step 4: Select the value you want to parameterize from the Constants list and click Parameterize. The Data Driver Wizard opens.
Step 5: Select the type of parameterization you want to perform:
Step-by-step parameterization. Enables you to view the current values of each step containing the selected value. For each step, you can choose whether or not to parameterize the value and if so, which parameterization options you want to use.
Parameterize all. Enables you to parameterize all occurrences of the selected value throughout the action. You set your parameterization preferences one time and the same options are applied to all occurrences of the value.
Step 6: If you selected Step-by-step parameterization, click Next. The Parameterize the Selected Step screen opens.
If you selected Parameterize all, the Parameter option is enabled in the Configure value area. Select your parameterization preferences the same way that you would for an individual step.
Step 7: Data Driver Wizard-Parameterize the Selected Step dialog box appears.
Step 8: Select Parameter Radio button and click on browse button (Parameter option).
Step 9: Parameter Option dialog box appears, in the Name field enter the Template Name.
Step 10: In Location in the Data Table select the Global Sheet or Current action sheet (local) to insert the data, and click on Ok.
Step 11: Click Next, and Click on Finish to insert the data.
Step 12: Do the same step to insert the new datas.
Step 13: Through the data table (Designed Time Data table) apply the multiple no of Inputs.
Step 14: Execute the script to check the Result.


30.2. Parameterizing through the Keyword View.
When you test your applications, you may want to check how the application performs the same operations with multiple sets of data. Forexample, suppose you want to check how your Web site responds to ten separate sets of data. You could record ten separate tests, each with its ownset of data. Alternatively, you can create Data Table parameters so that your test runs ten times, each time using a different set of data. this way of setting parameters is called parameterization.
Step 1: Enter the Script for the particular application.
Step 2: open the keyword view, select the Input (that you want to parameterize) in the value field.
Step 3: Now it shows parameter option button, just click on it to open the Value Configuration options.
Step 4: In the Value Configuration Options just select the Parameter Radio Button.
Step 5: In Value Configuration Option dialog box select Name field and modify the name which you want enter as a template in the Data Table.
Step 6: In the Location in Data Table select the Data Table you want to insert (Global Sheet and Current Action Sheet (local)).
Step 7: Click on Ok to insert the selected value in the Selected Data Table.
Step 8: Do the same step to apply for more no of Templates.
Step 9: Enter the Multiple number of inputs through the data table for the Particular Script.

29. Synchronization Point:


Synchronization is used to instruct Quick Test to wait for the application process to complete before proceeding to the next step in the test.
Quick Test Professional has a default global synchronization timeout. This timeout indicates that during text execution, Quicktest waits for an object to achieve a specific status or for the timeout of the object synchronization to occur before moving on to the next step.
If a process takes considerably longer to complete, the global synchronization timeout may not sufficient for the step to complete and the next step might fail. To give these longer steps in a test enough time to complete, add a synchronization point.
Quick test Professional displays an error message if it proceeds to the next step before completing the previous steps.


29.1. Add a Synchronization Point While Recording:
A Synchronization Point must be inserted while recording.
To add a Synchronization Point:
Step 1: Click on Record Button.
Step 2: From the Quick Test Professional menu bar, select Insert>Synchronization Point. The cursor changes to a pointing Hand.
Step 3: Use the pointing hand cursor to select the object in the Flight Reservation window for which you want to add the Synchronization point. The Object Selection-Synchronization Point dialog box appears.
Step 4: Click OK. The Add Synchronization Point dialog box appears.
Step 5: From the Property Name list, select the property name and in the Property Value field, type the property value for which Quick Test should wait before moving to the next step.
Step 6: in the Timeout field, type the synchronization point timeout in milliseconds. This time will be added to the global timeout. Click Ok.


Note: we can insert the Synchronization point manually by wait (time). E.g.: wait (5).

28. Function Definition Generator:


Quick Test provides a Function Definition Generator, which enables you to generate definitions for new user-defined functions and add header information to them. You can then register these functions to a test object, if needed. You fill in the required information and the Function Definition Generator creates the basic function definition for you. After you define the function definition, you can insert the definition in your function library and associate it with your test, or you can insert the definition directly in a test script in the Expert View. Finally, you complete the function by adding its content (code).
To open Function Definition Generator:
Step 1: Make sure that the function library or test in which you want to insert the function definition is the active document. (You can click the document's tab to bring it into focus.) This is because the Function Definition Generator inserts the function in the currently active document after you finish defining it.
Step 2: we need to open new Function Library Page to insert the Function Syntax and to execute the Function.
Step 3: Choose Insert > Function Definition Generator or click the Function Definition Generator button . The Function Definition Generator opens.
Step 4: In the Name box, enter a name for the new function. The name should clearly indicate what the operation does so that it can be easily selected from the Step Generator
Step 5: From the Type list, choose Function or Sub, according to whether you want to define a function or a subroutine.
Step 6: From the Scope list, choose the scope of the function—either Public (to enable the function to be called by any test, or component whose application area is associated with this function library), or Private (to enable the function to be called only from elsewhere in the same function library). By default, the scope is set to Public. (Only public functions can be registered to a test object.)


Note: If you create a user-defined function manually and do not define the scope as Public or Private, it will be treated as a public function, by default.


Step 7: In Preview Screen we can able to see the Functions.
Step 8: Click on OK to insert the Syntax.

Monday, November 30, 2009

27. Step Generator:

The step Generator enables you to add steps to a test by selecting from a range of context-sensitive options. Using the Step Generator dialog box, you can add steps that perform operations using the following criteria.
ð Category: Specifies an object or functions that the step performs. The options available in the Category list are:
· Test Objects: Display contents of Object Repository.
· Utility Objects: Display predefined list of utility objects.
· Functions: Display all the functions including Build-in, Library and Local script functions.
ð Operation: Specifies available options based on the category selected.
ð Arguments: Specifies a value set for an argument. The argument may be optional depending on the object and operation being used.
ð Step Documentation: Display information about the current Step.

To display the Step Generator:
Step 1: From the Quick Test Menu bar, Select Insert>Step Generator (or) Press F7. Step Generator dialog box appears.

27.1. Test Objects:
Step 2: In Category field Select Test Objects.
Step 3: In Object field click on Browse button.
Step 4: Select Object for Step dialog box appears. Click on Hand Symbol at the Bottom left of the dialog box.
Step 5: After clicking Hand Button, it shows Hand Symbol, click on the applications element which you want to Insert.
Step 6: Object Selection dialog box appears, Click on Ok.
Step 7: Now that captured value is added to the Step Generator, Enter the Value in the Argument field, click on OK.
Step 8: Now script is inserted in the QTP. Like this just Insert Lot of Scripts.

27.2. Utility Objects:
Step 9: Open the Step Generator Same like Step 1.
Step 10: In the Category field Select Utility Object, it is used to insert the System utility Scripts.
Step 11: In Object field select the Utility. E.g.: Systemutil
Step 12: In Operation Field Defaultly it select after selecting values in the Object field.
Step 13: Enter the values in the Argument field. E.g.: Path of the application.
Step 14: Click OK to insert the Script.
Step 15: Do the Same steps to Insert the remaining Scripts.


27.3. Functions:
Step 16: Open the Step Generator Same like Step 1.
Step 17: In the Category field Select Functions, it is used to insert the Functions.
Step 18: In Library field select the Library. Eg: All.
Step 19: In Operation Field select operation for the particular function. E.g.: Inbox to insert the Inbox Function.
Step 20: Enter the values in the Argument field.
Step 21: Click OK to insert the Script.
Step 22: Do the Same steps to Insert the remaining Functions.

26. Virtual Object Collection:


You store similar virtual objects in a named Virtual Object collection. For Example, you can create virtual objects for the various buttons in the Paint toolbar and store them in a named Virtual object collection called paint.
You use Virtual Object Manager to view the information about Virtual object collections. To open Virtual Object Manager.
Step 1: From the Quick Test Professional menu bar, select Tools>Virtual Objects>Virtual Object Manager.

25. Virtual Objects:

Your application may contain objects that behave like standard objects but are not recognized by Quick Test. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box. Quick Test emulates the user's action on the virtual object during the run session. In the test results, the virtual object is displayed as though it is a standard class object.
For example, suppose you want to record a test on a Web page containing a bitmap that the user clicks. The bitmap contains several different hyperlink areas, and each area opens a different destination page. When you record a test, the Web site matches the coordinates of the click on the bitmap and opens the destination page.
To enable Quick Test to click at the required coordinates during a run session, you can define a virtual object for an area of the bitmap, which includes those coordinates, and map it to the button class. When you run a test, Quick Test clicks the bitmap in the area defined as a virtual object so that the Web site opens the correct destination page.
Quick test learns the information about the boundaries associated with the Virtual Object along with the Standard object type that the Virtual Object emulates. Quick test stores this information in Virtual Object Manager.
When you record a test that uses a virtual object, quick test stores the virtual object in the object repository for the test. Quick test uses the information in the object repository to recognize the virtual object test playback.
Quick test does not recognize virtual objects during analog recording or Low-Level Recording. You cannot use the Object Spy feature to Recognize Virtual Objects.

To create a Virtual Object:
Step 1: On the Quick test Professional menu bar, select Tools>Virtual Objects>
New Virtual Object to open the Welcome to The Virtual Object Wizard page.
Step 2: Click Next. The Map To a Standard Class page appears. From the Class list, select the class (Object) to which you want to map the Virtual object, and click Next. The Mark Virtual Object page appears.
Step 3: Click Mark Object Button. The cross-hairs symbol appears. Use the cross-hairs symbol to mark the area for the virtual object. Ensure that the object areas for multiple Virtual objects do not overlap.
Step 4: On the Mark Virtual Object page, click Next. The Object Configuration page appears.
Step 5: In the Identify Object Using section, select the Parent Only option or the Entire Parent Hierarchy option, and click Next.
Step 6: In the Save Virtual Object page that appears, specify a name for the Virtual object and collection in the Name and Collection Name fields, respectively.
Step 7: Select the Yes option if you want to create more virtual objects. Otherwise, select No, and click Finish.
Step 8: Now use Record option to generate the Script and see the Result.

24. Merge Object Repositories:


Two shared object repositories can be merged into a single object repository. This is done in the Object Repository Manager.
When you merge two shared object repository, the primary object repository and the Secondary object repository, a Third object repository called Target object Repository gets created. To merge two object repositories:

Step 1: In the Object Repository Manager, select Tools>Object Repository Merge Tools. The New Merge dialog box appears.
Step 2: In the New Merge dialog box, type or select the names of the object repositories that you want to merge.
Step 3: Click OK.
Step 4: The Statistics message box appears. The message box displays the details of the conflicts and the number of unique items merged from the two repositories.
Step 5: Click Close. The Object Repository-Merge Tools window appears. It displays the objects in the target object repository.
Step 6: Save the target object Repository.
Step 7: Then recognize it to the QTP by using Associate Repository.
Step 8: Enter the Script.


Sunday, November 29, 2009

23. Recovery Scenario Manager:

Identifying Exceptions:
Unexpected events during a test run disrupt a test or may give invalid test result. For example, during a test run, an application error may occur. This error does not permit the automated test to navigate to the feature, Screen, or Module that needs to be tested. These unexpected errors and events are called exception.
An exception could occur in the AUT or an exception could occur because sources are external to the AUT. For Example, an exception occurs if notification messages, such as you have mail or Printer out of Paper, appear during a test run.
Events that are expected to occur during a test run are not called exceptions. For Example, the message box that appears when you enter a bad password is an expected event. Similarly, the prompt to save changes or enter details in a mandatory field are expected events. You cannot classify these events as exceptions.
Introduction to a Recovery Scenario:
To successfully complete a test run, you need to identify the exceptions that can occur during a test run and take appropriate action to handle the exceptions.
You can create recovery scenarios in Quick Test Professional to handle exceptions that occur during a test run. A recovery scenario consists of the following components:
• Trigger: Specifies the exception that may occur during a run session. For Example, the test may be interrupted by an error pop-up window.
• Recovery: Instructs Quick Test how to handle the exception. For Example, you can instruct Quick Test to click a button on the error pop-up window to close the window.
Post-Recovery: Instructs Quick Test how to proceed after the recovery operations are performed. For Example, after an exception is handled; you may want Quick Test to restart a test from the beginning.
After you create a recovery scenario, you can associate it with one or more tests.

To create Recovery Scenario:
Step 1:
Enter invalid input in the application, and execute the Script. Now it shows the pop-up message.
Step 2: From the Quick Test Professional menu bar, select Resources>Recovery Scenario Manager. The Recovery Scenario Manager Dialog box appears.
Step 3: In the Scenario Section, click the New Scenario button to display Recovery Scenario Wizard.
Step 4: Click Next. The Select Trigger Event appears.

Note: In the first component of a Recovery Scenario, you identify the event type that can disrupt a test run.
To select a trigger Event type:
• Popup Window: if a popup window appears in an open application.
• Object State: If a mismatch occurs between the expected and the actual state of an object in the test.
• Test Run Error: If a step in the test fails.
• Application Crash: If an open application fails.

Step 5: Select Popup Trigger Event, click Next.

Note: After you select a trigger event type, you specify the conditions that can help Quick Test identify the correct event during a test run.

Step 7: On the Specify Pop-up Window Conditions page, click the Pointing hand button, and click the Pop-up error message box that you want the recovery scenario to handle.
Step 8: The Window Title and the Window Text Contains fields display the conditions to identify the Pop-up window.
Step 9: Click Next. The Recovery Operation Page appears.
Step 10: No need to enter anything now, click Next.

Note: After you specify the trigger event type and the trigger event conditions in Recovery Scenario Wizard, you specify the recovery operation(s) required to handle the trigger event. To identify the recovery operation.
Step 11: Select Keyboard or Mouse Operation, it performs a key press or a mouse click recovery operation.
Step 12: Select Next to select a recovery operation, such as Click Button with Label.
Step 13: Click on Hand Button to capture the buttons in the Pop-up error message.
Step 14: Now it captures the Ok button, click on Next.
Step 15: Click Next to Capture another button.
Step 16: Next>Keyboard or Mouse Operation>Next>Click Buttons with Label>Click on Hand button.
Step 17: Press Control Button to Deactivate the Capture and click on OK in the error pop-up message.
Step 18: Now Remove the Control Button and Capture the Cancel Button in the application to close the Application.
Step 19: Click on Next.
Step 20: Remove the Add another Recovery Operation Checkbox to Stop adding Recovery Operation.
Step 21: Click on Next.

Note: After you specify the recovery operation, identify the operation that you want to perform when the recovery operation complete.
Step 22: Select Proceed to next test iteration Radio button in Post Recovery Test Run Options to apply no of iterations to the recovery, Click on Next.

Note: After you identify a trigger event and select the recovery and Post-Recovery operations for a recovery scenario, you use the Name and Description page to provide a name and Description for the recovery scenario.
Step 23: In Scenario Name field enter the name for the Scenario you created and enter the Description in the Description field (Optional).
Step 24: Click on Next.
Step 25: The Completing The Recovery Scenario Wizard page displays the details of the recovery scenario in the Scenario Settings Section.
Step 26: To associate the recovery Scenario with the current test, check the Add Scenario to Current Test Check box.
Step 27: To save the recovery Scenario, Click Finish. The Recovery Scenario Manager Dialog box appears.

Note: After you create a recovery scenario, save the recovery scenario to a file.

Step 28: In Recovery Scenario Manager, click Save button to save the Scenario, and click Close to close the Recovery Scenario Manager.
Step 29: To add an existing recovery scenario to a test. From the Quick Test Professional Menu bar select File>Settings.
Step 30: In the Settings dialog box, click the Recovery tab.
Step 31: Defaultly the Saved Recovery will be available, if it not Available, click the Add button.
Step 32: Browse the Saved Recovery to the particular test. Click OK to apply the Scenario to the test.
Step 33: Execute the Script to Analyze the Result.

22. Object Repository Manager & Associate Repository:

Object Repository Manager is also called as Shared Repository.
By Using Object Repository Manager we are Capturing some objects and saving this captured objects but we are not recognizing anything to the QTP.
Now we can share this captured action to any test.
If you plan to use shared objects in a test, you can create a shared object repository before you create the test. A Shared object repository can be used for multiple tests. Multiple shared object repositories can store shared objects.
You specify the shared object repositories that you want to use for an action in a test before you record a test. You can also create new shared object repositories and associate these repositories with an action in a test after you record the test.

To create and manage shared object Repositories
Step 1:
Open the Application that you want to Capture.
Step 2: Open the Object Repository Manager by Resources>Object Repository Manager.
Step 3: Object Repository Manager Dialog box appears.
Step 4: Select Object> Add Objects to add the objects to Repository Manager (or) click on Add Objects icon in Tool Bar.
Step 5: After Clicking Add Objects to Local it shows Hand Symbol, by using this Symbol click on the application (Which you want) to Capture the Objects.
Step 6: After Capturing Object Selection-Add to Repository dialog box appears, Click on OK.
Step 7: Define Object Filter dialog box appears, select All Object types Radio Button to capture all the objects in the Application for Recognition, Click on OK.
Step 8: Now in the Object Repository Manager dialog box captures all the objects from the application.
Step 9: Now Click on Save Button to save the Captured Objects in the Repository Manager.
Step 10: Now just close the Object Repository Manager.


Note:
Now if you try to write the script in the test it will not accept your script because we used Object Repository Manager only for Capturing not for Recognition.
Note:
Now we want to recognize the saved Repository to write the Script. For Recognition purpose use Associate Repository.
Note:
You want to use Object Repository Manager compulsorily we want to Use Associate Repository for Recognition Purpose.

Step 11: To Open Associate Repository Resources>Associate Repository.
Step 12: Associate Repository dialog box appears.
Step 13: Click on Add Repository Button to open the saved Repository.
Step 14: Select the Action 1 in the Available Action Field and click on button to add the Action to Associate Actions, and then click on Ok to Recognize the Repository.
Step 15: Now Enter the Script in QTP.

Note:
Use the Object Repository Manager to manage all shared object repositories at one central location. In the Object Repository Manager you can:
Create a shared object Repository.
Associate Object Repositories to actions.
Add objects to a shared object repository.
Save a shared object Repository.
Modify an object in a shared object repository.

Saturday, November 28, 2009

21. Object Repository:

This Object Repository is also called as Local Repository. Because we can use the captured objects only for the particular test. We unable to share the captured objects to any other test.

When you create an action in a test, Quick test creates a new local object repository that store objects used in the action. This local object repository is the default type of object repository.

A local object repository stores objects associated with a specific action, so that only that action can access the stored objects.

When you record a test, Quick test automatically saves the information about the objects that you record in the local object repository. Quick test creates separate local object repositories for each new action.

Object Repository is used to Recognize each and every objects to QTP.

To use Object Repository:

Step 1: Open the Application that you want to Recognize.

Step 2: Select Resource menu>Object Repository.

Step 3: Object Repository-All Object Repository dialog box appears.

Step 4: Select Object> Add Objects to Local to add the objects to Local Repository (or) click on Add Objects to Local icon in Tool Bar.

Step 5: After Clicking Add Objects to Local it shows Hand Symbol, by using this Symbol click on the application (Which you want) to Recognize to the QTP.

Step 6: After Capturing Object Selection-Add to Repository dialog box appears, Click on OK.

Step 7: Define Object Filter dialog box appears, select All Object types Radio Button to capture all the objects in the Application for Recognition, Click on OK.

Step 8: Now in the Object Repository- All Object Repository dialog box captures all the objects for application.

Step 9: Close the Object Repository-All Object Repository dialog box.

Step 10: Now just enter the script in the test.

20. Object Spy:

Object spy is used to identify the applications objects properties.

(or)

Using the Object Spy pointing hand mechanism, you can view the supported properties and methods of any object in an open application. As you move the pointing hand over the objects in the application, their details are displayed in the Object Spy. These details may include the test object's hierarchy tree, its properties and values, and the methods associated with the object. For methods, the syntax is also displayed. In most environments, you can choose to view the test object properties and methods or the run-time (native) properties and methods.

In some environments, the test object is also highlighted in the application as you move the pointing hand over it. This enables you to visually distinguish between the various test objects in the application.

Step 1: Open your application to the page containing the object on which you want to spy.

Step 2: Choose Tools > Object Spy or click the Object Spy toolbar button to open the Object Spy dialog box and display the Properties tab.

Step 3: Object Spy dialog box appears.

Step 4: Select the details you want to view for the object.

    • Click Run-time Object Properties or Test Object Properties.
    • To view the object's available methods and syntax, click the Methods tab. Otherwise, the Properties tab is displayed by default, enabling you to view the object's properties and their values.

Step 5: In the Object Spy dialog box, click the pointing hand.Quick Test is hidden. As you move the pointing hand over the test objects in your application, the test objects are highlighted, and you can view their test object properties or methods in the Object Spy dialog box. You can also view their parent objects in the object hierarchy tree area of the Object Spy dialog box.

Step 6: Highlight or click the object whose properties or methods you want to view. The Object Spy displays the object hierarchy tree and the properties or methods of the object that is selected within the tree.

Step 7: If you want to copy an object property or value, or a method's syntax to the Clipboard, click the property, value, or method to highlight it. The value is displayed in the selected property/value or method syntax box (located above the Description box). Highlight the text in the box and use Ctrl + C to copy the text to the Clipboard or right-click the highlighted text and choose Copy from the menu.

19. Start Transaction and End Transaction:

It is used to find the execution time of enclosed VB script Statements. Each transaction name should have an associated Start Transaction and End Transaction. The Start Transaction statement must appear before the associated End Transaction. A transaction can be inserted anywhere in your test, but must start and end within the same action.

Inserting Start and End Transaction:

Step 1: Enter the Script in the test.

Step 2: Place the cursor at the required place in the test Script to enclose.

Step 3: Click on Insert>Start Transaction.

Step 4: Start Transaction dialog box appears.

Step 5: Then enter the start transaction Name. Eg: Login.

Step 6: Select Insert Statement as Before Current Step, Click on OK.

Step 7: Now Start Transaction Script will be inserted in front of the current step you selected.

Step 7: Click on Insert>End Transaction.

Step 8: End Transaction dialog box appears.

Step 9: Then Enter the End Transaction Name. Eg: Login.

Step 10: Select Insert Statement as After Current Step, click on OK.

Step 11: Now End Transaction Script will be inserted at the end of the current step you selected.

Step 12: Execute the script to Analyze the Result.

18. Split Action:

You can split an action that is stored with your test into two sibling actions or into parent-child nested actions. When you split an action, the second action starts with the step that is selected when you perform the split action operation.

You cannot split an action and the option is disabled when:

  • an external action is selected
  • the first step of an action is selected
  • recording a test
  • running a test
  • you are working with a read-only test

When you split an action in your test that uses a local object repository:

  • Quick Test makes a copy of the local object repository.
  • The two actions have identical local object repositories containing all of the objects that were in the original local object repository.
  • If you add objects to one of the split actions, the new objects are added only to the corresponding local object repository.

To Split an Action:

Step 1: Enter the Script for the particular application.

Step 2: Insert the Cursor on the Particular line you want to split.

Step 3: Select Edit>Action>Split Action.

Step 4: The Split Action dialog box appears.

Step 5: In the Action Are Section, select one of the following options:

ð Independent of each Other: Creates two new independent actions.

ð Nested: Creates parent and child actions, where the last step in the parent action calls the child action.

Step 6: In the 1st Action Section, in the Name field, type a name for the first action.

Step 7: In the 2nd Action Section, in the Name field, type a name for the second action.

Step 8: Click OK to close the Split Action dialog box.

Step 9: Analyze the Result for Split Action.

17. Delete Action:

Delete action is to delete the Action from the test.

When you delete a reusable action from a test, the action is removed from the test flow list. The action’s local data sheet is also removed. The original action is not affected.

Step 1: Select the particular action you want to delete.

Step 2: Select Edit >Action>Delete Action.

Step 3:Particular Action will be Deleted.

16. Call to WinRunner:

When QuickTest links to WinRunner to run a test, it starts WinRunner, opens the test, and runs it. Information about the WinRunner test run is displayed in the QuickTest Test Results window.

You can insert a call to a WinRunner test using the Call to WinRunner Test dialog box or by entering a TSLTest.RunTestEx statement in the Expert View.

To insert a call to a WinRunner test using the Call to WinRunner Test dialog box:

Step 1: Choose Insert > Call to WinRunner > Test. The Call to WinRunner Test dialog box opens.

Step 2: In the Test path box, enter the path of the WinRunner test or browse to it.

Step 3: After opening the winrunner file, just select Close winrunner after running the test for closing the winrunner after executing the script it automatically closes the Win runner.

Step 4: Click on OK, to insert the Script in the QTP.

Step 5: Execute the Script to analyse the Result.

15. Call to Existing Action:

You can insert a call to a reusable action that is stored in your current test (local action), or in any other test (external action). Inserting a call to an existing action is similar to linking to it. You can view the steps of the action in the action view, but you cannot modify them. The called action's local object repository (if it has one) is also read-only. If you call an external action, you can choose, however, whether you want the data from the action's data sheet to be imported as a local, editable copy, or whether you want to use the (read-only) data from the original action.

To modify a called, external action, you must open the test with which the action is stored and make your modifications there. The modifications apply to all tests that call that action. If you chose to use the original action's data when you call an external action, then changes to the original action's data are applied as well.

To insert a call to an existing action:

Step 1: Choose Insert > Call to Existing Action, right-click an action icon and select Insert Call to Existing Action, or right-click any step and select Action > Insert Call to Existing. The Select Action dialog box opens.

Step 2: Use the From test browse button to find the test containing the action you want to copy. The Action box displays all local actions (actions that are stored with the test you selected).

Step 3: In the Action list, select the action you want to insert. When you select an action, its type (Non-reusable or Reusable Action) and description, if one exists, are displayed. This helps you identify the action you want to call.

Step 4: In location field select After the Current Step if it is Reusable action.

Step 5: Click on OK to copy the Action.

14. Call to Copy of Action:

Inserting Calls to Copies of Actions:

When you insert a call to a copy of an action into a test, the original action is copied in its entirety, including checkpoints, parameterization, the corresponding action tab in the Data Table, plus any defined action parameters. If the test you are copying has objects in the local object repository, the copied action's local object repository is also copied together with the action.

The action is inserted into the test as an independent, non-reusable action (even if the original action was reusable). Once the action is copied into your test, you can add to, delete from, or modify the action just as you would with any other non-reusable action. Any changes you make to this action after you insert it affect only this action, and changes you make to the original action do not affect the copied action.

Before applying call to copy of action we need to apply reusable action and save it.

To create a copy of an action and call the copy in your test:

Step 1: While recording or editing your test, choose Insert > Call to Copy of Action, right-click an action icon and select Insert Call to Copy of Action, or right-click any step and select Action > Insert Call to Copy. The Select Action dialog box opens.

Step 2: Use the From test browse button to find the test containing the action you want to copy. The Action box displays all local actions (actions that are stored with the test you selected).

Step 3: In the Action list, select the action you want to insert. When you select an action, its type (Non-reusable or Reusable Action) and description, if one exists, are displayed. This helps you identify the action you want to copy.

Step 4: Select Edit new action Properties Checkbox to modify the script after inserting.

Step 5: In location field select After the Current Step if it is Reusable action.

Step 6: Click on OK to copy the Action.