Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parameterization of object's properties in UFT?

I need to dynamically handle the object properties through code in my project as many of the object values are changing dynamically. So is there any way to parameterize object's properties in UFT?

like image 294
Aakanksha Rastogi Avatar asked Apr 21 '26 04:04

Aakanksha Rastogi


1 Answers

To parameterize Object's Properties you need to Open your Object Repository in Object Repository Manager and go to Tools > Manage Repository Parameters and here you will get a window named as Manage Repository Parameters. In this window click on "+" button and add Name, Default Value and Description of the parameter. Till here you have successfully added the Dynamic Parameter.

Now to assign this parameter to an object what you need to do is just click on your object in which you want to use this property and then configure the value of required description property by pressing Ctrl + F11. Now from Repository Parameter window you can select "Parameter" radio box and select the property you added before and click OK.

After doing all these steps use this object in your code by just writing the below code and you are good to go with Parameterization of your Object.

Repository.Value("AddedObject") = "ValueYouWantToPassInRequiredProperty"
like image 70
Nitish Aggarwal Avatar answered Apr 23 '26 05:04

Nitish Aggarwal