Facebook

For any corporate training requirements Please mail To sudhakar@qtpsudhakar.com
Course Name Date Time Duration Type Location
An important update from QtpSudhakar. I stopped giving classroom training in MindQ Systems. I have bigger plans and I want to put an end to regular classroom training because very less people are practicing. From now onwards every session of mine is going to have explanation and practice. Everyone should practice in presence of mine and should go out of classroom with practical knowledge. So I started my own institute AnyTechLabs in Madhapur. Please reach out to +91-8328152362 for course details. Visit AnyTechLabs.com for address details.
Selenium + Cucumber 22nd September 9 AM IST to 2.00 PM IST 4 WeekEnds Theory + Practical AnyTechLabs
Selenium + Cucumber 8th October 7.30 AM IST to 9.00 AM IST 45 Days Theory+Practical AnyTechLabs

A book "Cracking the QTP interview" authored by Sudhakar.Read More. Buy From FlipKart

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

Ex:
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

a

1 comment :

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

    ReplyDelete