GeekInterview.com
Series: Subject: Topic:
Question: 635 of 1523

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

Asked by: gardekp | Member Since Feb-2007 | Asked on: Feb 23rd, 2007

View all questions by gardekp   View all 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. 

  
Login to rate this answer.
prashanth

Answered On : 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

  
Login to rate this answer.
TheScientist

Answered On : 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.

  
Login to rate this answer.

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.

  
Login to rate this answer.
saurabh

Answered On : 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.

  
Login to rate this answer.
aravind

Answered On : 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

  
Login to rate this answer.
Sumit Behl

Answered On : 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 steps1. Create and object with the property values as shown below2. Put all the objects having these common properties in a list3. 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

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.