ExecuteScript("script") Help!!

Class library usage, coding and language questions.
Posts: 10
Joined: Tue Nov 05, 2019 5:17 am

ExecuteScript("script") Help!!

Post by NuzakFarnas » Mon Nov 25, 2019 1:12 pm

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:
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. hotmail.com
Last edited by NuzakFarnas on Tue Nov 26, 2019 5:33 am, edited 1 time in total.

User avatar
Ranorex Guru
Ranorex Guru
Posts: 7072
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: ExecuteScript("script") Help!!

Post by odklizec » Mon Nov 25, 2019 1:57 pm


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

Code: Select all

Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Posts: 374
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: ExecuteScript("script") Help!!

Post by Aracknid » Wed Dec 18, 2019 9:17 pm

I believe you need to put 'return' in front and the semi colon at the end...

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