Page 1 of 1

ExecuteScript("script") Help!!

Posted: Mon Nov 25, 2019 1:12 pm
by NuzakFarnas
My webpage contains a table that I need to to read from only after it finishes loading. When using the browser's console (F12), I can run the following code command to get the state of the table:
customersGrid.InCallBack();
this returns true/false depending on whether the table has finished loading. customersGrid is an ASPxClientGridView

But I always get 'Undefined' when executing the same command in Ranorex using the following:
Report.Log(ReportLevel.Info, customersTable.OwnerDocument.ExecuteScript("customersGrid.InCallBack()"));

Any tips on the ExecuteScript("...") usage in this specific case would be much appreciated.10.0.0.0.1 192.168.1.254 hotmail.com

Re: ExecuteScript("script") Help!!

Posted: Mon Nov 25, 2019 1:57 pm
by odklizec
Hi,

Are you sure you are executing it with correct element? Have you tried to execute it with DOM element?

Code: Select all

repo.Dom.Self.ExecuteScript("customersGrid.InCallBack()")

Re: ExecuteScript("script") Help!!

Posted: Wed Dec 18, 2019 9:17 pm
by Aracknid
I believe you need to put 'return' in front and the semi colon at the end...

e.g.
repo.Dom.Self.ExecuteScript("return customersGrid.InCallBack();")

Aracknid