Object Repository is not loaded when using ObjectRepositortUtil

1 Star2 Stars3 Stars4 Stars5 Stars (8)
Loading ... 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...

Error adding Object Repository dynamically to a read only test

1 Star2 Stars3 Stars4 Stars5 Stars (4)
Loading ... Loading ...

RepositoriesCollection utility object introduced in QTP 9.2 allows adding a Object Repository dynamically to a Action. The code shown below demonstrates how to add a object repository at run-time

RepositoriesCollection.Add "C:\Test.tsr"

The code above associates the Object Repository to the current action. But when the same code is added to a library and associate with the test, [...]

Register or Login to read the full article...

Object repository window does not show up or toolbar missing

1 Star2 Stars3 Stars4 Stars5 Stars (3)
Loading ... 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...

GetTOProperty Vs GetROProperty

1 Star2 Stars3 Stars4 Stars5 Stars (7)
Loading ... Loading ...

QTP provides 4 methods for working on a Test object properties

GetTOProperty
SetTOProperty
GetTOProperties
GetROProperty

A lot of times developers (Yes we are not testers) using QTP mix these methods and don’t know which one to use in which situation. After reading this article you will clearly understand Why, When and How to use these methods.
Before we go deep into [...]

Register or Login to read the full article...

DP Part 2 - Converting OR based scripts to DP

1 Star2 Stars3 Stars4 Stars5 Stars (10)
Loading ... 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...

  1. Suscribe to Email

    Enter your email address:

    Delivered by FeedBurner

  2. Most Viewed


  3. Sitemap

    open all | close all
  4. Most Rated

  5. Translator

    English flagItalian flagKorean flagChinese (Simplified) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flag
    Croat flagDanish flagFinnish flagHindi flagPolish flagRumanian flagSwedish flagNorwegian flagCatalan flagFilipino flagHebrew flagIndonesian flagLatvian flagLithuanian flagSerbian flag
    Slovak flagSlovenian flagUkrainian flagVietnamese flag           
    By N2H

Your Ad Here