Forum Discussion

praveensqa's avatar
praveensqa
Contributor
13 years ago

Create the object of particular entity(Table or Cell)

Hi All,



In QTP, following way i will create the object of particular entity(Table or Cell):




Function oLink()

 Set objLink= Description.Create

  Set objLink("ObjectType").value="Link"

  set objLink("Name").value="Link(0)"

  Set oLink= objLink

 End Function  


Can you please give the info ,how to create the object of particular entity. 

Thanking you.

Praveen 


1 Reply

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Praveen,



    TestComplete's analog of QTP's Description.Create is the FindChild method:

    PropNames = Array("ObjectType", "ObjectIdentifier")

    PropValues = Array("Link", 0)

    Set oLink = parentObject.FindChild(PropNames, PropValues)




    In addition, ObjectType and ObjectIdentifier are default identification properties for most web objects, so you can also access your link using the following simple notation:



    This is similar to QTP's Link("index:=0") notation.

    For more examples of this syntax that can be applied to your web application, examine the app in the Object Browser.