Forum Discussion

techgirlbb's avatar
techgirlbb
Contributor
8 years ago

JavaScript runtime error.tableDataCtable.Cell is not a function when trying to get the object proper

Hi we are writing routine to get the object values from summary page.
Example :
Aliases.browser.pageClientServiceManagerClientSe.frameFrcontent.formFrmmain.tableDataCtable.Cell(18, 1).contentText;
 
when I execute the routine I am getting
TypeError: Aliases.browser.pageClientServiceManagerClientSe.frameFrcontent.formFrmmain.tableDataCtable.Cell is not a function
 
please refer the screen shots and  share your thoughts
  • I've seen this before. The problem is not in your code but in your name mapping. Make sure that there are no child objects on that table that have the name of simply "cell". If so, rename them... You can simply add a number to the end.

    The reason for the error is that TestComplete gets confused between the mapped cell and the Cell object you're calling in code. Renaming the mapped object is the best solution.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    I've seen this before. The problem is not in your code but in your name mapping. Make sure that there are no child objects on that table that have the name of simply "cell". If so, rename them... You can simply add a number to the end.

    The reason for the error is that TestComplete gets confused between the mapped cell and the Cell object you're calling in code. Renaming the mapped object is the best solution.
    • vthomeschoolmom's avatar
      vthomeschoolmom
      Super Contributor

      I cannot even tell you how many times this thread has saved me.