Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to load the object repository at run time?

Answers were Sorted based on User's Feedback



How to load the object repository at run time?..

Answer / vinod

To be more simple
go with this

RepositoriesCollection.Add " .tsr File path "

Is This Answer Correct ?    16 Yes 1 No

How to load the object repository at run time?..

Answer / sanurajps

hi,

One of the new feature of QTP 9.2 is Dynamic Management of OR.

>>ADD - RepositoriesCollection.Add("D/OR/test.tsr")
-- it will add the 'test.tsr' file during the run time

>>FIND - Pos = RepositoriesCollection.Find("D/OR/test.tsr")
-- it will return a numeric value to the variable 'Pos' this
is nothing but the index value of the specified file

>>MOVETOPOS - RepositoriesCollection.MoveToPos(2,5)
-- here 2 is the current index and 5 is the new index
position. In this case it will move 2nd item to 5th position

>>REMOVE - RepositoriesCollection.Remove(5)
--it removes the 5th object repository file from the OR

>>REMOVEALL - RepositoriesCollection.RemoveAll
--it removes the full items from OR. Makes object repository
empty

>>COUNT - no = RepositoriesCollection.Count
--stores the number of repository items to 'no'

>>ITEM - desc = RepositoriesCollection.Item(4)
--returns the path of the 4th object repository file.


Thnx
Sanu

Is This Answer Correct ?    13 Yes 0 No

How to load the object repository at run time?..

Answer / sandeep.v

Dim qtApp
Dim qtRepositories
Set qtApp = CreateObject("QuickTest.Application")
Set qtRepositories = qtApp.Test.Actions
("ActionName").ObjectRepositories

qtRepositories.Add "E:\Sandeep_Documents\Sandeep_Working\sha
redRepository.tsr"

Is This Answer Correct ?    3 Yes 0 No

How to load the object repository at run time?..

Answer / sarath

Tried with QTP 9.1 and it works....

Dim qtApp
Set qtApp = CreateObject("QuickTest.Application")
'Add
qtApp.Test.Actions(1).ObjectRepositories.Add "C:\ObjRep.tsr"

'Remove
qtApp.Test.Actions(1).ObjectRepositories.Removeall

Is This Answer Correct ?    3 Yes 1 No

How to load the object repository at run time?..

Answer / sari

hi krishna,

LOADING OBJECT REPOSITY AT RUN TIME U WROTE SMALL FUNCTION
IN THAT U MENTIONED OBJECT .

CAN YOU PLZ EXPLAIN HOW THAT OBJECT WORK COMPLETELY

REGARDS
SARI

Is This Answer Correct ?    0 Yes 0 No

How to load the object repository at run time?..

Answer / ram.polavarapu

Repositarycollection.Add"file.tsr"

Is This Answer Correct ?    1 Yes 1 No

How to load the object repository at run time?..

Answer / atin

QuickTest Professional 9.0 does not support dynamically
loading object repositories at runtime. AOM (Automation
Object Model) statements are not designed to be executed
from within a test script.

QuickTest Professional 9.0 does allow you to associate and
load (not at runtime) multiple Object Repository files.

-Atin Srivastava

Is This Answer Correct ?    2 Yes 3 No

How to load the object repository at run time?..

Answer / uday kumar_anem

Use the Automation Object Model to specify the path to a
Object Repository:
Dim App 'As Application
Set App = CreateObject("QuickTest.Application")
App.Test.Settings.Resources.ObjectRepositoryPath
= "<PathToYourObjectRepositoryFileHere>"

Is This Answer Correct ?    2 Yes 3 No

How to load the object repository at run time?..

Answer / krishna reddy

Hi We can call the TSR file in runtime and in 8.2 and 9.0
also.

How means.. i am giving one function

Public Function UDF_ORUpdate(g_ActName,sv_qtFileName)
Dim qtApp
Dim qtRepositories
Set qtApp = CreateObject("QuickTest.Application")
Set qtRepositories = qtApp.Test.Actions
(g_ActName).ObjectRepositories
qtRepositories.removeall
qtRepositories.Add sv_qtFileName

End Function

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More QTP Interview Questions

how to lunch the application in the qtp tool ?

3 Answers  


can u write Script to do Data Driven Testing throuh Externel & internel XL Sheet

2 Answers   Relq,


How can we test an XML using QTP? I have been to an interview, where they have given me an XML which had 15 values and they have given those values on a separate page. They asked me to write a QTP script to check the XML is having those particular 15 values.

2 Answers  


Hi All, I have QTP installed on my machine but the application under test (AUT) is on remote desktop.My scenarios is like that,it should contain following steps. 1)Automatically it should click on start and then on remote desktop connection. 2)it should enter the IP address and then connect to remote desktop. 3)and then it should be able to record the application in remote machine and then run it also. Can somebody tell me how to record the application which is in remote machine.

0 Answers  


Hi Friends, Every one is posting the Answers for the existing questions.Try to post the questions that are asked in Recent Interviews.It will be useful to the other Job seekers.

1 Answers  


can we use QTP for load testing instead of load runner?

3 Answers  


An object is created, i dont know the methods available for that object, i want to find methods available for that object and use the required method. How i can do this???

4 Answers   HCL,


Syntax for how to call one script from another? and Syntax to call one "Action" in another?

2 Answers  


Extract a word from a sentenece?

5 Answers   IBM,


I AM NEW IN QTP,PLZ TELL ME ANY BOOKS FOR QTP, MY COMPANY IS QTP,SO I LEARN QTP,PLZ ANYBUDY HELP ME

68 Answers   AZTEC,


How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it?

7 Answers   Livetek,


what is key word driven frame work ? why it is called like that ? what is the diference between keyword driven and data driven frame work ?

0 Answers  


Categories