Just as we user GUI_Load function to load guimap at runtime wht's that in QTP which allows me to load Object Repository.
Senior QA Engineer,
Virtusa India Pvt Ltd,
Here in QTP, you can make all the settings for QTP at run time. e.g. for setting OR refer below code:
App.Test.Settings.Resources.ObjectRepositoryPath = "<Per-action>"
I dont think there is a need to laod GUI/OR, we just have to set it for the Action(s)
How Will u implement the same for QTP 9.0
The help docs should be able to answer your question
I like what i know and I know what i like
Please help me how to manage(Change/Add/Remove) Object Repository in QTP 9.0 dynamically through script. I am not getting any idea on seeing the help files.
Thanks in Advance,
Harish, Here's how you load gui at runtime
Sub SetObjectRepository(ByVal sFilePath)
Set qtApp = CreateObject("QuickTest.Application")
Set qtTestResources = qtApp.Test.Settings.Resources
qtTestResources.ObjectRepositoryPath="Z:\Mercury\Q TP\TSR Folder Name\TSRName.tsr"
Set qtTestResources = Nothing
Set qtApp = Nothing
is it required to do it Explicitly, i dont think its required since the Generate script button , does the same purpose. its easy than running around
I agree with ryamzon. This piece of code can be made reusable and invoked anytime. Thats the best way to go forward.
Don't forget that this should be executed from VBScript not QTP.
My linkedIn Profile
Agreed. Also the OR can be passed as an argument [img]/images/graemlins/smile.gif[/img]