Please ensure to include your code between [code][/code] tags while asking or replying to questions.

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

QTP- identifying same objects with same properties

06-12-2009, 02:23 PM
Post: #1
Not Solved QTP- identifying same objects with same properties
Hi,
Can anyone tell how to identify two objects say of same webclass "WebEdit" which has same properties , through descriptive programming in QTP?
Find all posts by this user
Quote this message in a reply
06-13-2009, 12:23 PM
Post: #2
Not Solved RE: QTP- identifying same objects with same properties
use index

- Thanks
Niranjan
Visit this user's website Find all posts by this user
Quote this message in a reply
01-28-2010, 12:10 PM
Post: #3
Not Solved RE: QTP- identifying same objects with same properties
Observe the below code, how the 2 'search' button of 'www.google.com' works using ordinal identifier.................


Code:
SystemUtil.Run "iexplore.exe","google.com"
Browser("title:=Google").Page("title:=Google").WebEdit("name:=q").Set "QTP script"
Browser("title:=Google").Page("title:=Google").WebEdit("name:=q").Submit
Wait(5)
Browser("name:=QTP script - Google Search").Page("title:=QTP script - Google Search").WebButton("name:=Search","index:=0").Highlight
wait(5)
Browser("name:=QTP script - Google Search").Page("title:=QTP script - Google Search").WebButton("name:=Search","index:=1").Highlight
Find all posts by this user
Quote this message in a reply
05-19-2011, 02:42 PM
Post: #4
Not Solved RE: QTP- identifying same objects with same properties
Hi,

Could u plz explain this code...
What for you have mentioned the name as q, if i changed this and execute it throws an error........

Code:
SystemUtil.Run "iexplore.exe","google.com"
Browser("title:=Google").Page("title:=Google").WebEdit("name:=q").Set "QTP script"
Browser("title:=Google").Page("title:=Google").WebEdit("name:=q").Submit
Wait(5)
Browser("name:=QTP script - Google Search").Page("title:=QTP script - Google Search").WebButton("name:=Search","index:=0").Highlight
wait(5)
Browser("name:=QTP script - Google Search").Page("title:=QTP script - Google Search").WebButton("name:=Search","index:=1").Highlight
Find all posts by this user
Quote this message in a reply
05-20-2011, 12:18 PM
Post: #5
Not Solved RE: QTP- identifying same objects with same properties
I guess you should use object spy to find properties which may differ. if you find one then add that property to your test object property set.

We use ordinal Identifier only when All Mandatory or Assistive or Smart Identification fails.

DP is never used to work on similar objects, its used only when the object changes properties dynamically.

I an not quite sure why you want to use DP, you have to use a property in DP which would be different for the two set of button so why not add them to you Test Object property set.
Find all posts by this user
Quote this message in a reply
07-20-2011, 02:56 AM
Post: #6
Not Solved RE: QTP- identifying same objects with same properties
Would you tell me how to get index? . I spied two webedit are same object properties but i don't see index. Only tell me the difference is outerhtml of two webedit. Would you let me know how to set value each webedit.
Find all posts by this user
Quote this message in a reply
07-20-2011, 10:11 AM
Post: #7
Not Solved RE: QTP- identifying same objects with same properties
Langxii, index is applicable only if all other properties of those webedits are same.Moreover it is used when qtp is not able to distinguish between objects, in your case, it is not identifying webedit itself due to some other problem
Find all posts by this user
Quote this message in a reply
07-20-2011, 12:28 PM (This post was last modified: 07-20-2011 12:32 PM by souvikghosh_diatm.)
Post: #8
Not Solved RE: QTP- identifying same objects with same properties
@@Langxii:--


What rajpes has said that is absolutely correct...but would like to mention one thing, basically index property can not be found by spying any object.....if u add that object in repository, that time u can find it under ordinal identifier section.....And if index is not there then there must be some properties which makes those two webedits differs from each other....u hav to find out those properties......


if any doubts are there then send me two different screen shots of your OR after adding those objects in OR.....


----------
Thanx.
Find all posts by this user
Quote this message in a reply
08-07-2012, 04:25 PM (This post was last modified: 08-07-2012 04:26 PM by abhishekjain_87.)
Post: #9
Not Solved RE: QTP- identifying same objects with same properties
Hi All,

I have an windows application to test. The Object in the page has all the properties same. I am unable to run a script because the QTP doesn't enter data in the fields. Please help me what should i do to handle the above mentioned issue.

All Most all the properties are same they gave class name as Windows throughout the fields in a page. All other properties are also same. Finding it really difficult to solve the Issue. please reply if any one can help me regarding this.

Hi All,

I have an windows application to test. The Object in the page has all the properties same. I am unable to run a script because the QTP doesn't enter data in the fields. Please help me what should i do to handle the above mentioned issue.

All Most all the properties are same they gave class name as Windows throughout the fields in a page. All other properties are also same. Finding it really difficult to solve the Issue. please reply if any one can help me regarding this.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  not identifying the object properties seven 3 203 02-18-2014 04:23 PM
Last Post: supputuri
  QTP identifying WebList as WebEdit and an Element passion77 3 335 01-27-2014 10:21 PM
Last Post: supputuri
  UFT11.5 is not identifying the objects in IE9. qtpexpert 1 725 03-19-2013 11:59 AM
Last Post: gaveyom
  QTP is not identifying the objects in .net application. qtpexpert 0 504 03-12-2013 12:59 PM
Last Post: qtpexpert
  Identifying Objects on any screem dipti.pasricha 4 859 05-29-2012 07:18 PM
Last Post: supputuri



User(s) browsing this thread: 1 Guest(s)