Wednesday, December 3, 2014

Descriptive Programming in QTP

Descriptive Programming


Set Obj = Description.Create()

Pure Descriptive - Copy and paste below code in your QTP window and press run button, no need to have any OR.

systemutil.Run "www.google.com"

Browser("title:=Google").Page("title:=Google").WebEdit("name:=q").Set "Jaijeet Pandey"

Browser("title:=Google").Page("title:=Google").WebButton("name:=btnG").Click

Set NewObj=Description.Create()
NewObj("micclass").value="Link"
NewObj("name").value="Automation Testing.*"
Set ChildObj=Browser("title:=.*").Page("title:=.*").ChildObjects(NewObj)
Browser("CreationTime:=0").Navigate ChildObj(0).getroproperty("url") 

Leave your comments in case of any query.............

Learn QTP online from Expert

I have been training software testers to become QTP automation experts. Currently I provide online training. Classes are taken on weekends. The course includes the following lectures with hands on automation.


Lecture 1 ................................................
Basics
Keyword View
Expert view
DataTable
Active Screen
Repository
Settings
Record & Play

Lecture 2 ................................................
Actions
Default Name
Properties
Call to existing
Call to copy
Reusable Action
External Action
Split Action
New Action
Repository
Delete Action
Settings

Lecture 3 ................................................
DataTable - Basic Operations
Local and Global sheet
Parameterization
Moving up & down in rows
Add columns at run time
Regular Expression
Import Sheet, Export Sheet

Lecture 4 ................................................
Object Repository
Local Repository
Shared Repository
Repository Merge tool
Associate Repository
Object Spy & Other Options
Smart Identification
Mandatory properties
Assistive Properties

Lecture 5 ................................................
Descriptive Programming
Working with Excel Objects
Web Tables & best uses

Lecture 6 ................................................
Error Handling
Recovery Scenario
Recovery Manager
Recovery Triggers
On Error Resume
Go To Zero

Lecture 7 ................................................
Checkpoints
Standard
Image
Bitmap
Text
Output alues
Checkpoints using Function

Lecture 8 ................................................
Others
Missing Resource
Reporter Event
Batch Execution
Transaction Timer
Quality Center Connection
Environment Variables
Recording Modes

Lecture 9 ................................................
Function
Library Files
In Built Functions (strcomp, mid, split, instr, replace,filter etc)
Date Functions
User Defined Functions
GetRo
GetTo
SetTo

Lecture 10 ..............................................
Script Debugging
Breakpoints
Shortcut
Debug Viewer

Lecture 11 ..............................................
Seat License
Concurrent License
Basic of VB Script
Conditional Statements
Looping Statements
Introduction of Framework

Case Study

Write to me at
________ jaijeetpandey@gmail.com
___http://twitter.com/jaijeetpandey

Error Handling


On Error resume next             -- > Activate Error Handler
.................................................
...............................................
...............................................
...............................................
.................................................

On Error go to 0                        -- > Stops Error Handler

Script Debugging Shortcuts in QTP


F3Record
F4Stop
F5Run
Ctrl + F5Run From Step
F9Insert/Remove Breakpoints
Ctrl + F9Enable/Disable Breakpoints
F10Step by Step execution
Ctrl + F10Execution from line 1 to step x,
where x is the step where you placed your curson at the time of
execution.

F11Step by Step Execution (helps to debug functions)
Shift + F11Execute Function in one GO.