Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP- identifying same objects with same properties
#1
Not Solved
Hi,
Can anyone tell how to identify two objects say of same webclass "WebEdit" which has same properties , through descriptive programming in QTP?
Reply
#2
Not Solved
use index
Reply
#3
Not Solved
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
Reply
#4
Not Solved
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
Reply
#5
Not Solved
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.
Reply
#6
Not Solved
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.
Reply
#7
Not Solved
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
Reply
#8
Not Solved
@@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.
Reply
#9
Not Solved
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  QTP is not identifying table with column names property but its identifing with index Anuradha B 1 2,984 02-12-2015, 04:00 PM
Last Post: Kirill
  QTP is not identifying Parent objects it self then how can we automate swapna.9n9 0 2,013 12-11-2014, 04:32 PM
Last Post: swapna.9n9
  not identifying the object properties seven 3 2,721 02-18-2014, 04:23 PM
Last Post: supputuri
  QTP identifying WebList as WebEdit and an Element passion77 3 8,386 01-27-2014, 10:21 PM
Last Post: supputuri
  UFT11.5 is not identifying the objects in IE9. qtpexpert 1 2,816 03-19-2013, 11:59 AM
Last Post: gaveyom

Forum Jump:


Users browsing this thread: 1 Guest(s)