Can anyone breif me ,How to associate Function Libraries, OR's during Run Time?
|
How to associate Function Libraries, OR's during Run Time?
|
|
09-12-2009, 06:13 PM
Hi ,
You can associate Func. Libraries using 'AOM' & OR's by using 'RepositoriesCollection' during RunTime. Search in the forums , you can get it.
09-12-2009, 08:31 PM
At run-time, libraries cannot be associated with a test. You will have to use one of the Execute (ExecuteFile, ExecuteGlobal) functions to load them dynamically.
09-12-2009, 09:56 PM
Hi Anshoo,
Could you please provide us the code to load functions dynamically. Thanks, Azeem
09-13-2009, 11:38 AM
Hi,
Use following code example for excuting function from library. Code: 'Use executefile function to load library files.
'Example:
executefile "C:\Documents and
Settings\tsheth\Desktop\Sample123.vbs"
x=50
y=50
result=Sum(x,y)
msgbox(result)
'Code in External Library file(.vbs file).
Public function Sum(a,b)
Dim sum
sum=a+b
Sum=sum
End Function
09-14-2009, 04:17 PM
Hi Tarik,
Thanks for your code, how to load OR's(more than one) dynamically at run time to a test. Thanks Azeem
09-14-2009, 04:25 PM
Hi,
To associate Object repository dynamically use the following code. Try this for attaching Object repository at run time. Code: Dim qtpApp
Set qtpApp = CreateObject("QuickTest.Application")
Dim qtpRepositories
Set qtpRepositories = qtApp.Test.Actions("Main").ObjectRepositories
qtpRepositories.Add("C:\ts.tsr")
09-14-2009, 05:23 PM
There is another easy of doing the same using 'RepositoriesCollection.Add'
I feel we should avoid using QuickTest application object during runtime
09-14-2009, 10:28 PM
@Tarik @Saket - Thanks for the Code both are working fine, But I want upload repositories dynamically using the "ObjectRepositoryUtil" object
Could you please let me know how to use the above object to load. Thanks, Azeem |
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| QTP not recogonising object during run time | Lavanya N | 2 | 4,300 |
10-28-2015, 12:46 PM Last Post: vinod123 |
|
| Writing to Run time data table | Neetha | 5 | 13,197 |
08-27-2015, 10:18 AM Last Post: supputuri |
|
| Calling a function in a Test Script from a function library | anupam4j | 3 | 6,994 |
06-26-2015, 12:31 AM Last Post: babu123 |
|
| QTP Takes Long time to Run | prasaad44 | 4 | 5,644 |
04-10-2014, 01:53 AM Last Post: prasaad44 |
|
| Getting run error passing a Frame into a user defined function!!! | sepgs2004 | 1 | 3,306 |
10-14-2013, 06:37 PM Last Post: anil2u |
|
Users browsing this thread: 1 Guest(s)

