Você está na página 1de 4

How to load a object repository in QTP during runtime? http://www.allinterview.com/showanswers/71685/how-to-load-a-objec...

Ads by Google Ads by Google

Uft QTP QTP Script


QTP Script QTP Tools
QTP Tools QTP Testing
Advertise your Business Here
Browse | Placement Papers | Company | Code Snippets | Certifications |
Visa Questions
Post Question | Post Answer | My Panel | Search | Articles | Topics | Errors

Testimonials Refer this Site Login | Sign Up

Categories >> Software >> Testing >> Automation Testing >> QTP

WinRunner (497) How to load a object repository in QTP during


Question runtime?
Load Runner
(503)
Question Submitted By :: QTP
QTP (3603)
Test Director (165) I also faced this Question!! Answer
Posted By
Rational TestSuite
(107)
Silk Test (59)
Answers were Sorted based on User's Feedback

Selenium (22)
Automation Answer we can add object repository at nath .t
Testing AllOther #1 runtime

1 of 4 1/29/2016 8:39 AM
How to load a object repository in QTP during runtime? http://www.allinterview.com/showanswers/71685/how-to-load-a-objec...

(405) Two ways are there u can add

1. when u write below syntax in


Action1

Syntax:
RepositoriesCollection.Add(Path)
Ex: RepositoriesCollection.Add(E:\OR
\ObjRes.tsr)

if write in Action1 it will automatically


add the Object
Respository to the Action1
(i.e Edit Menu-->Action-->Action
Properties-->Associate
Repository tab) at runtime.

no need to add the object repository


before running.

2. Add the object repository at runtime


by using AOM
(Automated Object Model)

Ex:
Dim qtAppn
Dim qtObjRes

Set qtAppn =
CreateObject("QuickTest.Application")
qtAppn.Launch
qtAppn.Visible = True

qtApp.Open "E:\Test\Test2", False,


False
Set qtObjRes = qtApp.Test.Actions
("Login").ObjectRepositories

qtObjRes.Add "E:\OR\ObjRes.tsr", 1

The above example Add the Object


Repository(ObjRes.tsr) to
the "Login" action in Test2.

Here also no need to add the object


repository in Test2.

Is This 46 5
Answer Yes No

2 of 4 1/29/2016 8:39 AM
How to load a object repository in QTP during runtime? http://www.allinterview.com/showanswers/71685/how-to-load-a-objec...

Correct
?

Answer StrPath = "D:\FrameWork\Repository guru


#2 \GoogleHomePage.tsr"
RepositoriesCollection.Add(StrPath)

Is This
14 2
Answer
Yes No
Correct
?

OTHER QTP INTERVIEW QUESTIONS

Question Asked @ Answers

HOW TO AUTOMATE CAPCHA IMAGES while creating


tcs 2
Gmail account

What is All object and Local object in Object Repositary?


3
Explain me please.

what is the code in QTP to take screen shot? tcs 3

How does u create new test sets in TD? crea 1

Hi all, Recently i faced this question in infosys What is


QTP architecture?? Is Architecuture and Framework are
3
same?? Can someone please give clear understanding of
this.

What is wrong in my code? 3

Can you give me the code to calculate the total number of


Links using the child object in the web page..? is there any dst-global-
2
other way to calculate number of links with out using the solutions
Child objects.??

How to make arguments optional in a function? liquid-crystal 5

why we use environment variables 5

3 of 4 1/29/2016 8:39 AM
How to load a object repository in QTP during runtime? http://www.allinterview.com/showanswers/71685/how-to-load-a-objec...

Can the mode of object repository be change during run


time? Eg. if the mode is per-action during design time can
2
i change it to shared and vice-versa? Any scripting
possible?

QTP Testing Process? 1

what is a active x control?can any one brief me about


1
active x controls

For more QTP Interview Questions Click Here

Copyright Policy | Terms of Service | Site Map | Site Map | Contact Us |

Copyright 2015 ALLInterview.com. All Rights Reserved.

AL L I n te r vi e w. co m :: Forum 9.com :: KalAajKal.com

4 of 4 1/29/2016 8:39 AM

Você também pode gostar