Forum Discussion

govind_wairya's avatar
govind_wairya
Occasional Contributor
16 years ago

Object does not exist-for web page element

Hi All,



I am using testcomplete8 evaluation version to test web application i used name mapping feature of testcomplete to map the web elements but when i run my script then error message "Object does not exist" is being shown in the log file.please tell me how to remove this error and access mapped object from my script



i am refering "Cross-Browser Testing with test complete" article for my web application testing.

6 Replies

  • govind_wairya's avatar
    govind_wairya
    Occasional Contributor


    H David,



    Thanks David for ur consideration, i have send my project plz check it and tell me what is the problem with this. 
  • govind_wairya's avatar
    govind_wairya
    Occasional Contributor


    H David,



    Thanks David for ur consideration, i have send my project plz check it and tell me what is the problem with this. 

  • Hi Govind,





    We have received your message. Currently, we are looking into the issue. We'll get in touch with you as soon as we have some results or need more information from you.





    Let's continue investigations via e-mail.
  • govind_wairya's avatar
    govind_wairya
    Occasional Contributor

    Hi Lexi


     


    In connection with your mail (Issue# M0079354] Web Submission - mapped name is
    working fine for IE8 but not working on FireFox)


     


    Thanks for your precious effort!


    I am sending my project suit again along with the
    problematic log and successfully executed log.


    My problem is as follows:


    1.      
    In my script folder we have created four
    directory named Common Function, Config_Setting, Declaration, TestCases.


    2.      
    Into  ‘TestCases’
    directory we made one script unit named “main”


    3.      
    From the ‘main’ unit we call one” Web_LoginTest(browser)”
    routine which again call “OpenLoginform(page)”
    and “AdminLogin()”
    routines one by one.


    4.      
    “OpenLoginform(page)”
    routine uses the mapped name of link to click on link and executes successfully
    on both browser i.e. IE8 and Firefox.


    5.      
    But when we call AdminLogin() routine which uses mapped name
    of text box to set text into the text box executes successfully on IE8 but
    script gets stop on firefox due to “The Object does not exist” error. So we
    again mapped name using firefox browser(You can see under “Name Mapping t”
    tree) and impose If Else conditional statement into AdminLogin() routine and put mapped name
    which is created by using firefox into the if block (if(Project.Variables.browserName="FireFox"))


    and put mapped name which is
    created by using internet explorer 8 into the if block (If (Project.Variables.browserName="Internet Explorer 8")) for successfully
    execution of routine.


     


     


    So we could not understand that one
    mapped name (for link) is working fine on both browser and another mapped name
    (for text box ) is working only on IE8.


     


     


    Thanks and regards


    Govind


  • Hi Govind,





    Thank you for the clarification. I got you now.





    According to the problematic test log, you get the "Object does not exist" error due to the fact that one of the parent cell objects of the target text box was not found (Aliases.theBrowser.pageLoginToPlanoResearch.panelMainTbl.panelMainContentInnerpge.panelInnerConsult.panelBorContNw.panelContMidPrtConstLtst.formFrm.table.cell.table.cell.tableTableBorder.cellUserIdTextbox). The problematic cell is mapped incorrectly (using the ObjectIdentifier property). The target ObjectIdentifier property for a cell object can change, so using it in the NM scheme is unreliable.





    To avoid this kind of issues, I recommend that you use the Extended Find feature to map text boxes and other objects on your web page. This will also let you get a more readable NM tree, as you can just remove the junk cells and panels from the NM scheme. See "Using Extended Search Criteria for Mapped Object Identification" and related help topics for the information.





    In addition to this, the "Browser-Independent Scripting" help topic can help you accomplish your task.





    I hope this helps.