This error will come in QTP, when it find more then one object with the properties which you have provied to the object.
so the QTP will confuse on which object it has to perform the operations.
What you have to do is clearly analyze the object properties and change the object properties so that it can identify the unique object.
to know how many objects are currently match with the current set of properties which you have provided , i suggest you to get the child count from its parent object with the current object properties what you have provided.
to get the child objects, try the below example
set qtpobj = Description.create
qtpobj("html tag").value="A"
qtpobj("name").value="Home"
set childobjs = Browser("title:=QtpComplete").page("title:=QtpComplete").childobjects(qtpobj)
msgbox childobjs.count
if the count is one then the properties you enter is correct and enough
No comments:
Post a Comment