05-02-2011, 04:09 PM
(This post was last modified: 05-02-2011, 04:11 PM by prodipto_dutta.)
I have QTP Fraemwork related query, I already developed a code which dynamically load repositories,add library file and it is working fine.
But while generating the code I came up with lot of questions.
please read the code what i developed
sample.vbs file -
Now my questions are :
1. even though loading environmental file dynamically it will not show value in the QTP script, not able getting any values for environment veriable , but it is added dynamically ?
2.here i add .tsr file for one action , but a test can have multiple action , how could I associate that .tsr file for all the action with in the same test ?
3. even test can have some external action which is belongs to some different test and that test can have others .tsr file.
How could I handle it ?
Please answer my all above question and since I am new, I am trying to develope this piece of code.
Thanks in advance .....
But while generating the code I came up with lot of questions.
please read the code what i developed
sample.vbs file -
Code:
EnvXMLfile = "C:\properties.xml"
libraryfile = "C:\\commonLibraryFunctions.vbs"
Set qtp_App = CreateObject("QuickTest.Application")
qtp_App.launch
qtp_App.Visible = True
qtp_App.Open "C:\sampletest",true,false
qtp_App.Test.Environment.LoadFromFile(EnvXMLfile)
qtp_App.Test.Settings.Resources.Libraries.RemoveAll
qtp_App.Test.Settings.Resources.Libraries.Add(libraryfile)
qtp_App.Test.Actions(1).ObjectRepositories.RemoveAll
qtp_App.Test.Actions(1).ObjectRepositories.Add "C:\Shared OR.tsr"
qtp_App.Test.Run
Now my questions are :
1. even though loading environmental file dynamically it will not show value in the QTP script, not able getting any values for environment veriable , but it is added dynamically ?
2.here i add .tsr file for one action , but a test can have multiple action , how could I associate that .tsr file for all the action with in the same test ?
3. even test can have some external action which is belongs to some different test and that test can have others .tsr file.
How could I handle it ?
Please answer my all above question and since I am new, I am trying to develope this piece of code.
Thanks in advance .....