
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 ...
Sometimes clicking on the Object Repository (OR) button on the toolbar does not bring up the Object Repository window. This issue mostly happens with people who use Multiple monitors with QTP and place the Object Repository window on the secondary monitor. When they relaunch QTP with only one monitor connected, QTP remembers the old co-ordinates [...]
Read the full article...
Tags used -
hidden, invisible, missing, multiple monitors, not visible, Object Repository, OR, toolbar

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