Showing posts with label QTP. Show all posts
Showing posts with label QTP. Show all posts

Thursday, 11 September 2014

Object Repository Part-4

6. Generating Basic script: From QTP 9.5 version onwards we can create script using Test objects by performing Drag & Drop operation. 7. Add/Remove Description properties: Some times when there is a similar objects are exist in application then default collected description properties may not sufficient to identify Runtime object, then we can add some other properties for a Test object Navigation: Ø  Select “Test object” in OR Ø  Click on [+] button in Description properties Ø  Select property name Ø ...

Object Repository Part-3

Operations in OR: Adding Test objects: To identify runtime objects we should provide test objects into OR Learning process:                                                               i.      Auto-learning                                                             ii.      Pre-Learning                                                           iii.      By...

Object Repository Part-2

Associating shared OR:- --------------------------- In general we prefer shared OR in organization, Based on requirement we associate shared OR to an action script Method1: from “Resources” menu Navigation:  “Resources” menu   >>Select “associated repositories”   >>Click on “+” button   >>Browse “shared OR “file path   >>Select “Action name” in available Actions list   >> Add into associated actions list    >>Click “OK”  Method2: “Resources”...

Object Repository Part-1

Object Repository It has objects and it’s properties which are used in the script during runtime the tool will search for the object repository, based on properties it will recognize the object in application. Object Repository Types:- In QTP we have 2 types of OR’s a.Local OR (per-Action) b.Shared OR a.Local OR:- ------------------ It is a default OR type for each action in QTP  For each action QTP provides individual Local OR  When we save\open test by default QTP implicitly save\open corresponding Local OR   w.r to test  **Local...

Launching application using Script PART-2

VB Script for web based application to perform operations Object type Object Class Browser Browser(“Browser name”) Page Page(“Page name”) Frame Frame(“Frame name”) Table WebTable(“Table name”) Link Link(“Link name”) Edit box/Text box WebEdit(“Edit box name”) List box/combobox Weblist(“list box name”) Check box WebCheckbox(“checkbox name”) Push button WebButton(“object name”) ...

Launching application using Script PART-1

Launching application using Script: There are 2 types of functions to launch application during runtime Invokeapplication: SystemUtil.Run: Invokeapplication: Using this function we can open applications during runtime (only .exe file) Where as it supports only .exe files Syntax: to open windows based applications Invokeapplication “path of application” Ex: write script to open “Calculator” application Syntax: to open web based applications Invokeapplication “ browser_path Application_URL” Ex: write Script to open Google.co.in...

Object Identification during Runtime/Test Object Model (TOM)

Test Object:  Objects which are exist in “Object Repository” Where Test object consist some of the description property values Runtime Object:  Objects which are exist in AUT Where Runtime object consist all the property values which are provided by developer During runtime QTP use Test object description property values to identify runtime object in AUT, based on logical name used in the script Learning process: Adding new test objects into Object Repository is called learning or application maps Learning can be performed...

Tuesday, 9 September 2014

Shortcut Keys for QTP

Short keys: Ctrl+M       à to comment block of statements Ctrl+Shift+M àto uncomment block of statements Ctrl+W       à to apply “With” to script Ctrl+Shift+W àto remove “With” from script Ctrl+F7      àto check syntax error Shift+F2     àto Rename Action F3              à for Standard Recording Shift+Alt+F3          ...

Object Spy

Object Spy: Using this component we can view the application object property values and operations which we can perform on that object Navigation: Ø  Click on “Tools” menu in QTP Ø  Select “Object Spy” Ø  Click on hand icon button Ø  Click on application object which object properties and operations do you want to view Note: Window class object will contain Menu options Dialog class object will not contain menu options Ex: write script to perform login operation Step 1: Activate Login window Step 2:...

VbScript in QTP Part-3

Vb Script for standard windows based applications Objects Object class in VB Script Main window Window (“window name”) Sub window/pop-up window Dialog(“sub window name”) List box\combobox WinCombobox(“list box name”) Check box WinCheckbox(“check box name”) Radio button WinRadiobutton(“Radio button name”) Edit box\text box WinEdit(“Edit box name”) Push button WinButton(“object ...