GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 563 of 646    Print  
In QTP how do you test if two fields has same properties?

  
Total Answers and Comments: 4 Last Update: December 17, 2007     Asked by: nikila 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 21, 2007 04:43:31   #1  
Sycho Member Since: November 2007   Contribution: 66    

RE: In QTP how do you test if two fields has same prop...
hi,

Basiclly when QTP record some action on the application. It identify an object and its mandaotry properties information and store it in its Object Repositry. But when it founds two objects with similar information then it also capture some assitve (Optional) properties information for object so that two object have different Object information its Object Repositry and can be identified uniquely.

Regards,
SYCHO

 
Is this answer useful? Yes | No
December 04, 2007 12:47:27   #2  
Anshoo_Arora Member Since: October 2007   Contribution: 384    

RE: In QTP how do you test if two fields has same properties?
Their location still will be different. You can also use their "Index" property to differentiate between them.
 
Is this answer useful? Yes | No
December 05, 2007 01:23:34   #3  
prasad.devathi Member Since: November 2007   Contribution: 5    

RE: In QTP how do you test if two fields has same properties?
It shows same in manidatory properties so, we can go to assistive property in that we can select msw id means Microsoft window id, it is unique. so it is the best thing
 
Is this answer useful? Yes | No
December 17, 2007 04:16:36   #4  
Sycho Member Since: November 2007   Contribution: 66    

RE: In QTP how do you test if two fields has same properties?
Hi,

Are you asking for the following answer. Please reply

You can also use GETTOPRPOPERTIES method of Test Object which returns collection of properties for test object. you can then get name and value of the each property for the test object.

Using this approach you get get the properties collection of two object and can compare their values using IF ELSE statement.

For Button 1
Set Properties = Dialog().WinButton1().GetTOProperties
PropertiesCount = Properties.Count

For i=0 to PropertiesCount-1
Property_Name1 = Properties(i).Name
Property_Value1 = Properties(i).Value

For Button 2
Set Properties = Dialog().WinButton2().GetTOProperties
PropertiesCount = Properties.Count

For i=0 to PropertiesCount-1
Property_Name2 = Properties(i).Name
Property_Value2 = Properties(i).Value

IF Property_Name1=Property_Name3 AND Property_Value1=Property_Value2 THEN
MsgBox "Object are Same"
ELSE
MsgBox "Object are not Same"
END IF



 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape