Forum Discussion

achand's avatar
achand
Contributor
14 years ago

Different Object Hierarchy for FF and IE

As in the attached screenshot, the same object belongs to different hierarchy in FF and IE.

So when i run test in FF it works but in IE i get following errors.

Error:

"An error occurred while calling the "Click" method or property of the "linkButton"
object.

The object or one of its parent objects does not exist."



How can we fix this issue so we can successfully run test in cross browsers.



Can we adjust name-mapping to resolve this issue??

  • Hello Jab,

    Try turning on the "Extended Find" check box next to the "linkButton" object in the Name Mapping Editor. This will enable the Extended Search feature, which can reduce the object hierarchy differences between Firefox and Internet Explorer.  

    Regards.
  • I tried it using extended name mapping but still didn't work.

  • Ok, then (while having the "Extended Find" still enabled) try adjusting the mapping criteria of the "linkButton" object. The purpose is to establish the same set of identification properties to be applied both in Firefox and Internet Explorer. Properties names should be the same, whereas the properties values may have variable parts denoted through the * and ? wildcards. See Modifying Mapping Criteria.





    Regards. 
  • Each time i record the object ObjectIdentifier value for the panel changes so it cannot recognize the previously recorded panel. ObjectIdentifier value is integer so can't use "*".





  • Hello,

    Then, instead of the ObjectIdentifier property, you should consider using some more consistent property as the recognition attribute (Caption, name, namePropStr etc).

    Another way to improve the NM recognition is to add meaningful IDs to the page elements at the design time. For example: <div id="loginPanel"> 

    In this case, the assigned ID value will be used as the value of the ObjectIdentifier property.