Micro Focus QTP (UFT) Forums
Code to associate files of QTP - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: General (https://www.learnqtp.com/forums/Forum-General)
+--- Forum: Posting Guidelines/Disclaimer (https://www.learnqtp.com/forums/Forum-Posting-Guidelines-Disclaimer)
+--- Thread: Code to associate files of QTP (/Thread-Code-to-associate-files-of-QTP)



Code to associate files of QTP - chaithanya84 - 06-21-2012

Hi,

Please help me on this,

is there any code, that associate library, config and repository files to QTP script. So that it reduces manual effort by opening each and very script and associate files.

since if we have 500 scripts, it takes more time to do it manually.

Thanks,
Chaithanya


RE: Code to associate files of QTP - sshukla12 - 06-22-2012

(06-21-2012, 09:52 PM)chaithanya84 Wrote: Hi,

Please help me on this,

is there any code, that associate library, config and repository files to QTP script. So that it reduces manual effort by opening each and very script and associate files.

since if we have 500 scripts, it takes more time to do it manually.

Thanks,
Chaithanya


Hi,
Please find the below code to associate OR to ur script.Use it as reference to associate library and config file.

strRepPath = "c:\vIns\OR.tsr" (path of OR)
RepositoriesCollection.RemoveAll()
RepositoriesCollection.Add(strRepPath)


Regards,
Sankalp



RE: Code to associate files of QTP - chaithanya84 - 06-22-2012

(06-22-2012, 10:36 AM)sshukla12 Wrote:
(06-21-2012, 09:52 PM)chaithanya84 Wrote: Hi,

Please help me on this,

is there any code, that associate library, config and repository files to QTP script. So that it reduces manual effort by opening each and very script and associate files.

since if we have 500 scripts, it takes more time to do it manually.

Thanks,
Chaithanya


Hi,
Please find the below code to associate OR to ur script.Use it as reference to associate library and config file.

strRepPath = "c:\vIns\OR.tsr" (path of OR)
RepositoriesCollection.RemoveAll()
RepositoriesCollection.Add(strRepPath)


Regards,
Sankalp

Thanks a lot Sankalp!!!


RE: Code to associate files of QTP - sshukla12 - 06-22-2012

(06-22-2012, 11:15 AM)chaithanya84 Wrote:
(06-22-2012, 10:36 AM)sshukla12 Wrote:
(06-21-2012, 09:52 PM)chaithanya84 Wrote: Hi,

Please help me on this,

is there any code, that associate library, config and repository files to QTP script. So that it reduces manual effort by opening each and very script and associate files.

since if we have 500 scripts, it takes more time to do it manually.

Thanks,
Chaithanya


Hi,
Please find the below code to associate OR to ur script.Use it as reference to associate library and config file.

strRepPath = "c:\vIns\OR.tsr" (path of OR)
RepositoriesCollection.RemoveAll()
RepositoriesCollection.Add(strRepPath)


Regards,
Sankalp

Thanks a lot Sankalp!!!


U r always welcome. Wink

Regards,
Sankalp