Forum Discussion
Thank you Alex. It was really good approach .
I executed the following code , please verify and I am getting JScript runtime error 'page' is undefined . Please correct me where I am going wrong. I attach screen shot
function VerifyGridValue(textValue)
{
Sys.Browser("*").Page("*").Wait("10000");
tableContainer = page.FindChild(['ObjectType', 'ObjectIdentifier'], ['Panel', 'grid_container'], 10);
var Cells = tableContainer.FindAllChildren(['ObjectType', 'ObjectIdentifier'], ['Panel', 'uiGrid_0007_cell'], 10).toArray() ;
console.log(Cells);
}
In addition to the note by baxatob:
.FindAllChildren() returns an array, thus while
console.log(Cells);
will work if executed from command line via cscript engine, the same line will fail in TestComplete as there is no console object.
You will need to either convert the array to string or iterate through it. Code example can be found, for example, here: http://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/findallchildren-method.html
Related Content
- 3 years ago
Recent Discussions
- 2 days ago