Course Name Start Date Time Duration Registration Link
QTP/UFT Weekend Training 26th June 2021 9AM - 2PM IST 4 weekends ClickHere to Register
Please mail To sudhakar@qtpsudhakar.com to Register for any training

Monday, March 9, 2009

Using RunTime Object Properties in QTP

Prerequisite to understand this entry

1. Descriptive programming     ( Click Here to know about Descriptive Programming)
2. RunTime and Test object properties ( Click here to know about Test Object Properties and RunTime Object Properties)

Using RunTime Object Properties in Descriptive Programming

In Descriptive programming we will specify properties in script or in a vbs file. In regular usage for any object we use only test object properties. The usage of runtime object properties should be like this

Using TO Properties
Browser("Title:=Google").Page("Title:=Google").WebEdit("name:=q").set "hi"

Using RO Properties
Browser("attribute/LocationName:=Google").Page("attribute/nameProp:=Google").WebEdit("attribute/name:=q").set "hi"

When specifying run time object properties in descriptive programming, before specifying property value add attribute/propertyname.

Using RunTime Object Properties in Object Repository
To use runtime object properties for object repository we need to configure Object Identification settings.

1. Decide for which object and what ROproperties you want to add
2. Add the property name in mandatory properties list
3. Add the object in Object Repository

I want to add a property (title) for web edit object. While adding I should mention the property name as attribute/title. Because the property which we are specifying is RO property.

Go to Tools--> Object Identification --> Select Web Environment--> Select WebEdit class -->Click on Add/Remove Button under Mandatory properties --> Click on New button -->Specify New Property Name as attribute/title -->OK-->OK-->OK

Now there is a ROproperty called title added to webedit object class.

Go to Object Repository window and add Google search edit box. You will identify attribute/title:= Google Search.
Observe in below Image


1 comment :

  1. Hi Sudhakar.... Thanks for the detailed explanation on how to use RO properties in DP.Regards,Mouli