
Loading ...
Recently answering a quiz on LearnQTP and this query being asked on KnowledgeInbox forums I thought of explaining my answer. Consider the code shown below
If Browser("Browser").Page("Page").WebEdit("test").Exist(0) = True Then
Msgbox "Object Exist"
Else
Msgbox "Object Does not exist"
End if
The code above executes fine but it will always display “Object does [...]
Register or Login to read the full article...
Tags used -
Always, compare, Condition, Else, ElseIf, Exist, Exists, Fail, False, If, Object, True

Loading ...
We executed the below code in QTP and found that things don’t work the way they are supposed to
Dim RepositoryFrom
Set RepositoryFrom = CreateObject("Mercury.ObjectRepositoryUtil")
RepositoryFrom.Load "C:\KIB\Demo.tsr"
Browser("KIB").Page("KIB").WebEdit("test").Set "Test"
The Browser(”KIB”).Page(”KIB”).WebEdit(”test”) object is present in the demo.tsr file. Another version of the code that does not work is as below
Set RepositoryFrom = CreateObject("Mercury.ObjectRepositoryUtil")
RepositoryFrom.Load "C:\KIB\Demo.tsr"
Set oTestEdit = RepositoryFrom.Load("Browser(""KIB"").Page(""KIB"").WebEdit(""test"")")
oTestEdit.Set "Test"
The code snippets [...]
Register or Login to read the full article...
Tags used -
Error, Issue, load, loaded, Mercury.ObjectRepositoryUtil, Object, Object Repository, ObjectRepositoryUtil, OR, unload

Loading ...
When launching the Siebel application with SWECmd=AutoOn parameter in the URL you might get a “Failed to connect to Siebel” error message. This error message indicates that the Siebel client package is corrupt and needs to be repaired. Corruption of Siebel packages can also cause QTP to stops identifying any of the Siebel objects even [...]
Register or Login to read the full article...
Tags used -
cannot, corruption, Error, Fialed to connect to Siebel, identification, identify, Object, Repair, Siebel, Unable

Loading ...
I have always been against the use of QTP Smart Identification (SI) feature whether it is development time to when the script are actually deployed for live testing. The reason behind this dislike is not personal but something logical. Most people think that Smart identification should be enabled when deploying the test scripts for live [...]
Register or Login to read the full article...
Tags used -
algorithm, Exist, login, Object, password, SI, Smart Identification, SmartIdentification, use

Loading ...
Exist method of QTP sometimes returns False even when the object exists. There could be 3 possible reasons in my opinion
Possible cause #1
One reason for this issue could be used of wrong properties to identify the object. Ex - you might be using a html id which has been changed now.
Possible cause #2
There are multiple [...]
Register or Login to read the full article...
Tags used -
creationtime, Exist, False, index, location, Object, True

Loading ...
QTP identifies windows object using their classes. All default class map to a specified window Test object in QTP. Ex – The “Edit” class maps to WinEdit test object, “Static” class maps to the Static Test object.
Objects inside applications developed using standard windows API can be easily identified and automated through QTP.
But at times applications [...]
Register or Login to read the full article...
Tags used -
Custom, identification, identify, map, mapping, Object, Object identification, windows, WinObject

Loading ...
This article would go over some common mistakes people make while using Descriptive Programming (DP) in QTP.
Using strings with Pattern
Let’s assume we want to click a link “Logout (Tarun)” on my web page. Two possible methods that can be used are
Method 1
Browser("miccclass:=Browser").Page("micclass:=Page").Link("text:=Logout (Tarun)").Click
Method 2
Set oDesc = Description.Create
oDesc("text").Value = "Logout (Tarun)"
Browser("miccclass:=Browser").Page("micclass:=Page").Link(oDesc).Click
Now both the above methods will [...]
Register or Login to read the full article...
Tags used -
cannot, Class, Class Name, Common, Descriptive, Descriptive Programming, identify, micclass, Object

Loading ...
This article discusses how we can convert an Object repository based script to DP based script. For this we will do a simple recording of entering some text on Google.com search text box and clicking the Google search button
The QTP generated script would look something like below
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
Browser("Browser").Page("Page").Sync
Browser("Browser").Navigate "http://www.google.com"
Browser("Browser").Page("Google").WebEdit("q").Set "KnowledgeInbox"
Browser("Browser").Page("Google").WebButton("Google Search").Click
All the names [...]
Register or Login to read the full article...
Tags used -
Convert, Descriptive, Descriptive Programming, Object, Object Repository, OR, Repository

Loading ...
The article provides answers to most frequently asked question on Quick test pro 8.2. It also provides some tips and tricks. A must read for people working on QTP.
Data Table
Two Types of data tables
Global data sheet: Accessible to all the actions
Local data sheet: Accessible to the associated action only
Usage:
DataTable("Column Name",dtGlobalSheet) for Global data sheet
DataTable("Column Name",dtLocalSheet) [...]
Register or Login to read the full article...
Tags used -
ADODB, Checkpoint, Connect, connection, Database, DataTable, dtGlobalSheet, dtLocalSheet, Environment, err, Error, GetROProperty, GetTOProperty, Global, Library, Local, Object, output, outputvalue, Recovery, Runtime, Test, Value