Table not found error is getting displayed
Hi All,
I am trying to get row values from table.
here is my javascrpit code:
Browsers.Item(btChrome).Navigate("url");
Aliases.browser.pageTestCmAccesshealthcarephysic.form.panel.fieldset.textboxUserid.SetText("Username");
Aliases.browser.pageTestCmAccesshealthcarephysic.form.panel.fieldset.passwordboxPassword.SetText("Password");
Aliases.browser.pageTestCmAccesshealthcarephysic.form.panel.fieldset.buttonSubmit.ClickButton();
Aliases.browser.pageTestCmAccesshealthcarephysic2.Wait();
Aliases.browser.pageTestCmAccesshealthcarephysic2.formSearchmemberform.fieldset.textboxMemberidinput.SetText("12");
Aliases.browser.pageTestCmAccesshealthcarephysic2.formSearchmemberform.fieldset.buttonSearchmembersbutton.ClickButton();
let table = Aliases.browser.pageTestCmAccesshealthcarephysic2.formSearchmemberform.FindChild("id", "SearchResultGrid", 10);
if (table.Exists)
{
// Goes through the rows and cells of the table
for (var i = 0; i < table.rows.length; i++)
{
Log.AppendFolder("Row " + i);
for (var j = 0; j < table.rows.item(i).cells.length; j++)
Log.Message("Cell " + j + ": " + table.rows.item(i).cells.item(j).innerText);
Log.PopLogFolder();
}
}
else
Log.Warning("The table was not found");
I am getting table not found error.
Could you please anyone can explain what is the mistake?
And how to find Test obj For find child.(TestObj.FindChild(PropNames, PropValues, Depth, Refresh))
I attached My name mapping file. Highlighted object is my table grid.
Thanks In Advance.
Thanks for the reply.
New code throwing error.
Correct code is :
let table= Aliases.browser.pageTestCmAccesshealthcarephysic2.WaitAliasChild('tableSearchresultgrid', 10000);
tableSearchresultgrid is child of pageTestCmAccesshealthcarephysic2. With this code it's working.
Thanks :)