Tuesday, 9 September 2014

Vbscript in QTP Part-2

VB Script statement structure to perform operation on application object: Syntax: Object hierarchy.Method “Value” Ex: Write VB Script to enter “Rahul” in the “Name:” edit box at “Sample” window            Script: Window(“Sample”).winEdit(“Name:”).Set “Rahul” In general VB Script statement contains 3 sections 1.      complete hierarchy of test object (i.e. parent to child object) 2.      operation or method or Test Object method 3.      Value...

Vbscript in QTP - Part-1

VB Script It is a Microsoft scripting language VB script is case-insensitive For comment we can use “Rem” or Single quote (‘) in front of the statement Action Template: (Header file) To get pre-defined components in each Action script in QTP we create and maintain Action Template In general following are the components maintained in Action Template: Project: Module: Created By: Created On: Test Script Description: Referred Doc: QTP version: Reviewed By: Reviewed On: Navigation: to create Action template Open Text file Write required...

Low-Level Recording

Low-Level Recording: In following scenarios we can prefer Low-level recording 1.      To record operations which we perform on non-supported environment application objects 2.      To get exact co-ordinates of application object in the script Low-level recording mode is able to convert some of mouse clicks and keyboard operations . Script generates irrespective of object class like window and winobject Navigation: Enter into standard recording mode ·         “Automation” menu ·         Select “Low-Level...

Analog Recording

Analog Recording: It records mouse clicks, key board operations and mouse movements w.r.t screen area or specified window co-ordinates based. There are 2 types of options in Analog Recording: Record relative to screen: When we select this option QTP records our operations w. r. to desktop co-ordinates based Script: Desktop.RunAnalog “Track1” During runtime QTP identify same position on desktop and perform operations irrespective of application objects availability Note: this option can be preferred to record operations which we perform...

Standard Recording

Standard Recording: It records mouse clicks and key board operations which we perform on supported environment applications For each operation there will be individual steps generate in the script Script will generate w. r. to class of the object Navigation: for standard recording: Open New Test in QTP Click on “Record” icon Perform operations on AUT, which operations do you want to convert into automation script Stop recording Ex: create Basic script to perform multiply operation on calculator application Step 1: activate “Calculator”...