Now to load shared object repository runtime, we need to use the AOM approach. You can write the script inside QTP however it is not the right approach and not intended to be used this way.
Advantage: Using this approach you can import the OR just like your datatable at runtime. This will give flexibility when you are designing an automation framework
Be sure of the path of the OR 'path of shared OR tsr file' where you have saved the file
You can now add the necessary step in the generated script (in the last Script looks like in the Launch.vbs):
Script:
Dim qtApp 'Declare the application Object Variable
Dim qtObjRep 'Declare the object repository object
OR
qtApp.Test.Settings.Resources.ObjectRepositoryPath = “Path of the shared OR .tsr file
No comments:
Post a Comment