Forum Discussion

jinglu1977's avatar
jinglu1977
Occasional Contributor
13 years ago

The underlying object does not exist - Name Mapping Editor

While playing back, I run into the error of  "object does not exist". I look up to related topics and am pretty sure the object does exist at the moment it is checked, and it is uniquely identified.




 


Please see below for my diagnosis


(1) In Object Browser


a. Select object and "Highlight On Screen" --> the object is highlighted with a red rectangular


b. Select object and "Map Object" --> Warning: the object is already mapped to ... (It's as expected since the object is mapped automatically during recording)


c. Select object and "Show Object in Name Mapping Editor"


 


(2) In Name Mapping Editor


a. Select the Mapped Object and "Highlight On Screen" --> Error "The underlying object does not exist"


b. Select the Alias and "Highlight On Screen" --> Error "The underlying object does not exist"




What cause this conflict (the object exists in Object Browser, but not exist in Mapping editor).


 


Should we better not using Name Mapping?


 




 


9 Replies

  • scsvel's avatar
    scsvel
    Frequent Contributor
    Hi,



    Just try without using NameMapped name. i.e. Use full exact path  of control you want to use and do the operation.

    Also Check whether the VisibleOnScreen  property of the target object is true or false.



    Also check whether any dynamic object is there in the hierarchy of NameMapped Item. If so the properties will vary. Verify this one also.



    Hope this will help you...
  • Hi,



    Check the recognition parameters of your object in Name Mapping. Most probably, it is mapped by a dynamic property which changes its value.
  • jinglu1977's avatar
    jinglu1977
    Occasional Contributor
    Shanmugavel,



    It works without name mapping. So, we'd better not use name mapping?
  • jinglu1977's avatar
    jinglu1977
    Occasional Contributor
    Jared,



    On Windows Mobile, we often run into the scenarios in which multiple objects have exactly the same properties except the "Index". What should we do in  this case?
  • Hi,



    You can use the Index property to recognize your objects if there're no other properties which would allow you to recognize them in a reliable way. The only possible issue here is that indexes can be dynamic.



    Anyway, you can either map the target objects by Index and give them different names, or just address them by their full names without using Name Mapping.
  • vex's avatar
    vex
    Contributor
    This was happening to me as well, with Internet Explorer, but figured out what it was later.



    The FullName of the object was:



    If Sys.Process("iexplore", 2).Window("#32770", "Message from webpage", 1).Window("Button", "OK", 1)




    But the mapped browser process was not #2, it was the first one.



    I had to read this and do the deal about IE running astray.



    http://smartbear.com/support/viewarticle/11934/



    Little things like that are annoying to root around and figure out :)
  • mohit_testcompl's avatar
    mohit_testcompl
    Occasional Contributor

    Object is highlighting in a Test A and through error in Test B.









    "Test A" contains a script "VerifymenuItem" that is used to verify the menu item of a toolbar named "MenuBar_Application".. and working fine for it.

    But while I am using the same script for the "Test B" to do the same thing, it throws an error stating "Object Does not exist".





    when I go through the NameMapping file of test A, I am able to highlight "MenuBar_Application" Toolbar but unable to highlight it when I am viewing it in test B Name Mapping editor.





    And when I try to open the "MenuBar_Application" in the "Object Browser" it says "The underlying object does not exist" while it opens successfully in the test A.





    Both the test (Test A and Test B) are under same project suite and using the same name mapping file.