18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Gridview with sahi

Dinesh KanojiaDinesh Kanojia Members
edited November -1 in Sahi - Open Source
Hi All,

i am trying to find out number of rows from the gridview tool of .net but sahi giving me an errro of
JERROR Missing ) Statements so please if somebody find some solution revert back to me here is peice of my code

<browser>
function GetGrid_id()
{
var Gridviewid = document.getElementById("ctl00\$ContentPlaceHolder1\$grdBalanceReport");
var id=0;
for(id=0;id<Gridviewid.rows.count;id++)
{
var Rowid = Gridviewid.rows[id];
}
return Rowid;
}
</browser>

on for loop sahi return with an above error

any suggestion will be appreciable

thanks in advance
regards,
DInesh.k
Tagged:

Comments

  • narayannarayan Administrators
    Dinesh,

    Don't escape the $ in "ctl00\$ContentPlaceHolder1\$grdBalanceReport".
    Just use it as "ctl00$ContentPlaceHolder1$grdBalanceReport"

    Escaping is needed only if used as a parameter to a Sahi API.
  • Hi Narayan,
    i did but still it giving me same error at sam place .


    Thanks In Advance,
    Regards,
    DInesh.k
  • narayannarayan Administrators
    Dinesh,

    I tested with this code and it works fine for me.
    Can you tell me how you are calling it, and what line the error is on?

    Could you also send me the parsed script?
  • can u give me ur email id on dinesh.kanojia@griptechnologies.com so that i can forward my code to u
Sign In or Register to comment.