How does QTP Intentfies if page has 10 buttons with same name & value

Questions by gardekp   answers by gardekp

Showing Answers 1 - 7 of 7 Answers

For this question I will just suggest an example.  Let us think there are 10 buttons in a page.  Then all these buttons will have some similar properties and every button will have atleast one unique property.  If u r aware how qtp idetifies the objects then u must have known about how it learns the properties of the objects by using mandatory properties, assistive properties, and/or by using smart brain.  As per my knowldege every object in a page will the windowid in unique and by selecting the windowid property in the assistive properties or in the smart brain will help in identifing the objectings.  Even one can use this property in the mandatory properties list or smart brain. 

  Was this answer useful?  Yes

prashanth

  • Feb 28th, 2007
 

Fine, Let there be ten or hundread buttons their will be many unique properties to identify a button uniquely. For example, the button will not be at same x and y coordinates so with the help of x and y coordinates QTP can identify them uniquely

  Was this answer useful?  Yes

TheScientist

  • Mar 5th, 2007
 

If all the properties are the same (even assistive) then QTP uses ordinal identifier such as index of the object in the page.

  Was this answer useful?  Yes

if u change ur monitor from 15" to 17" then x y coordinates will change. so how will u run the same test case there? or u have to change ur code. so there must be some other way than x y coordiantes.

  Was this answer useful?  Yes

saurabh

  • Mar 13th, 2007
 

When there are same objects with ame name than qtp identifies it with the help of smart identification.
it uses either index or location property value to identify objects.

  Was this answer useful?  Yes

aravind

  • Mar 27th, 2007
 

If all the properties are the same (even assistive) then QTP uses ordinal identifier such as index of the object in the page.

first go through assistive properties , then towards ordinal identifier

  Was this answer useful?  Yes

Sumit Behl

  • Jun 7th, 2007
 

Try this:

In the following case, there are multiple assign links with the same properties. QTp identifies such objects based on Index while recording and re running.

Following code does three steps

1. Create and object with the property values as shown below
2. Put all the objects having these common properties in a list
3. Accessing the list using index and performing actions. Last step is about clicking the Assign Link based on a variable which has the index value or hard coding the index value based on your needs.

 Set Desc_act = Description.Create()
    Desc_act("html tag").Value = "A"
    Desc_act("innerhtml").Value = "Assign"
    Desc_act("text").Value = "Assign"
    Link_act = ""

    Set Link_act = Browser("Browser Name").Page("Page Name").Frame("Frame Name").ChildObjects(Desc_act)
      
    Link_act(LinkNo_assign).Click OR Link_act(5).Click

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions