Quality is delighting customers
Hi all,
Actually, Total 50 script in qtp, in my script two OR is already there , i don't no which OR is used which scripts. so i want to add two OR (shared) at run time. I am confused how to run this script.
i used below code.
but we found error
Dim qtRepositories1
Set qtRepositories1 = qtApp.Test.Actions("Action1").ObjectRepositories
lngPosition = qtRepositories1.Find("OR PATH") ' Try finding the Debug.tsr object repository
If lngPosition <> -1 Then ' If the object repository was found in the collection
qtRepositories.Remove lngPosition ' Remove it
End If
Pls help me
Tags:
Permalink Reply by Kalyani Yejju on December 17, 2010 at 1:11pm we can add object repositories at run time directly.plz find the following script how to add repositories at runtime.
RepositoriesCollection.Add (plz specify path of the shared repository here)
and we can remove the shared repository at runtime also
RepositoriesCollection.Remove(path of the repository that we want to remove)
Permalink Reply by vimal on December 17, 2010 at 5:15pm Yes, Kalyani but i want to 2 OR Remove and 2 OR add in run time. so first i want to remove OR and after ADD 2 OR.
Pls possible to any one give me code.
Permalink Reply by Sridhar Gurram on December 17, 2010 at 6:00pm Ya Vimal. What kalyani told is correct i think. We need some more clarity on your question. We can add 2 repositories and execute scripts. I am not clear on removing and adding repositoris again.?????
try this...
RepositoriesCollection.Add (plz specify path of the first repository here)
RepositoriesCollection.Add (plz specify path of the second repository here)
while running your code, iterate over each element in the repositories colelction
Permalink Reply by Kalyani Yejju on December 18, 2010 at 1:21pm Hi Vimal,
According to ur question u just want to delete all the repositories that are present and u want to add two repositories at run time?
plz follow the following script then you can understand.
Example: I just want to take the Login application
dim path1,path2
RepositoriesCollection.RemoveAll
path1=plz specify the path of the first shared repository here.
path2=plz specify the path of the first shared repository here.
Repositoriescollection.Add(path1)
systemutil.run plz specify the path of the application that u want to open automatically.
---------
--------
------
---------
--------
repositoriescollection.add(path2)
------------
-------------
at last
repositoriescollection.remove(path1)
repositoriescollection.remove(path2)
or else wecan delete the two repositories at a time by using the following statement.
repositoriescollection.removeall
I'l hope u understand the above concept that i wrote
still u have a doubt i'l send the example to u.
Thanks
Bye
bye
Permalink Reply by vimal on December 21, 2010 at 6:00pm Hi manoj ,
I got solution for OR removing and adding through script, Thanks all .
acctualy what happen , some Qa develop 50 scripts, and they can not add OR dynamically . so I want to Remove this OR dynamically with script and add OR.
and one More problem i have facing
SCENARIO: when i run driver script , 5 script is working fine and six script half working fine but one function is not working through driver script. when i debug this script , function and all Lib function is working fine . even i run normal mode then getting error , Debug mode is working fine.
Pls tell me what is the problem in this script or lib files
Permalink Reply by Sridhar Gurram on December 21, 2010 at 6:03pm what error u r geting????
© 2012 Created by Quality Testing.