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

Questions by gardekp   answers by gardekp

Showing Answers 1 - 16 of 16 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


  • 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


  • 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


  • 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


  • 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


  • Jan 5th, 2015

If index and location both are also same then how the objects will be identified?

  Was this answer useful?  Yes

Sachin Kumar

  • Feb 2nd, 2015

By using creationtime property QTP can understand the Buttons

  Was this answer useful?  Yes


  • Mar 12th, 2015

Hi,, index should not same with all object(button) otherwise we use x,y coordinate property values

  Was this answer useful?  Yes

Rajendra Mahapatra

  • May 29th, 2015

The values of Index properties of all the button must not be same. For first button index:=0, For second button index:=1 and so on. So by using Index property all the buttons can be identified.

  Was this answer useful?  Yes

sai sindhuja

  • Jun 18th, 2015

Sir yes its working but in my QTP window id is not there can you Please tell me another way for automate.
QTP Version 9.5

  Was this answer useful?  Yes

sai sindhuja

  • Jun 19th, 2015

In my case I have so many delete images but that image name is icon_delete but that name don't have at any property what I have do now if I take any property in that its showing error
please tell me the what to do?

  Was this answer useful?  Yes

sai sindhuja

  • Jun 29th, 2015

Hi sir,

I have a doubt in my view I have a table in that so many edit options with same properties, and I want to automate that edit option can you please help me I dont have any option to do this automate I tried so many way please

  Was this answer useful?  Yes


  • Jul 3rd, 2015

If we multi text box are present on a page then I think we need to use ordinal identifier in that case with the option below:
1) Creation time
2) Index.
3) Location.

  Was this answer useful?  Yes


  • Sep 28th, 2015

No button will be on the top of another button so Location cannot be same, location of every button would be different. Every button has unique Index value staring from 0 to n and left to right & top to bottom.

  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