TestComplete

Reply
Highlighted
Occasional Contributor

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
Posts: 4,458
Topics: 39
Kudos: 1,698
Solutions: 337
Registered: ‎11-30-2009

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

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.

Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Extensions available
Community Leaders Program
Join us to win gifts
Daily Articles: 1, 2, 3, 4, 5, 6, 7

Program Rules