SRIDHAR LUKKA

Description Object

Posted in QTP by Sridhar Lukka on August 21, 2008


Description Object

Description object is used to create an empty description object in the script. We can add properties and values to the created object.

Using an empty Description object

Set obj=Description. create

Here “obj” is an empty object and contains no properties. This refers any object in application.

Ex:-

Set obj=Description. create

Set objList=Browser(“micclass:=Browser”).Page(“micclass:=Page”).Childobjects( obj)

Msgbox objList.count ‘Gives Total objects count in the page

Using Description object with properties

Set obj=Description. create

obj(“micclass”).value=”Link”

Now “obj“is a link object and it refers all link objects in application.

Ex:-

1)

Set obj=Description. create

obj(“micclass”).value=”Link”

Set objList=Browser(“micclass:=Browser”).Page(“micclass:=Page”).Childobjects( obj)

Msgbox objList.count ‘Gives Total Link objects count in the page

2)

Set obj=Description. create

obj(“micclass”).value=”Link”

obj(“name”).value=”Login”

Set objList=Browser(“micclass:=Browser”).Page(“micclass:=Page”).Childobjects( obj)

Msgbox objList.count ‘Gives only the link which is having “Login” name

Description object is useful when object properties are changing dynamically or if objects are adding in application dynamically and also to handle the duplicate objects (repeated objects).

5 Responses

Subscribe to comments with RSS.

  1. shreya said, on September 11, 2008 at 11:00 am

    obj(“micclass”).value=”Link” doesnt work in my system Please let me know the reasion & solution.

  2. Rakesh said, on September 24, 2008 at 10:02 am

    please tell me all the steps to use text check point in my script.

  3. Rakesh said, on September 30, 2008 at 8:59 am

    hello,

    i m trying to compare 2 images from diff page.
    e.g.Toolbar–i m trying to compare available option for an user using Bitmap check point.i captured image, but i can’t able to compare these 2 image.
    user1 having some option & user2 having one additional option

    please let me know how to compare?

    thanks
    Rakesh

  4. Rakesh said, on October 4, 2008 at 1:03 pm

    shri,
    we are working on webapplication.
    our application having one field say first name,and if first name is valid & in database, its all related information will be displayed say Last name,address,City Etc. But when i entered first name thr’ data table field like Last name,address,City Etc. information is not populaing.
    But when i entered manually as soon as valid first name i complete all information gets populated.

    Developer used on Blur event

    please tell me concept to scipt same think

    Thanks

    Rakesh

  5. Usha said, on September 27, 2010 at 2:13 pm

    dis is good


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.