18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
How to ID checkbox inside cell inside table inside ModalDialog popup?
Recorder gave '_click(checkbox("chk_...");' which did not work.
Expect something like:
_popup("winID")._cell(_table("tblContacts"), 0, 0)._click(checkbox("chk_...")
RR
Below is a snippet of HTML to show the complexity:
if (sTR == 'NEW') {
var tbl = document.getElementById("tblContacts");
var i = iFindInsertRowNum("ZOne-Time", sTR);
var tr= tbl.insertRow(i);
tr.id="tr_"+sLName+sFName;
//<tr id='tr_PH_BJ1119100326_23' >
// <td align='center' width=40px><input type='Checkbox' ID='chk_PH_BJ1119100326_23' value='PH_BJ1119100326_23'></td>
// <td>Referring MD</td>
// <td><a href='#' onclick='editProvider("PH_BJ1119100326_23","Referring MD");' Title='Click to edit the provider information.'>Robert Kaplan</a></td>
// <td align='center'><a href='#' onclick='return editFaxNumber("Provider","PH_BJ1119100326_23",this);'>asasfdasfd</a></td>
//</tr>
var cell = tr.insertCell(0);
cell.innerHTML="<input type='checkbox' id='chk_" + sLName + sFName + "' checked/>";
cell.align='center';
cell = tr.insertCell(1);
cell.innerText="One-Time Recipient";
cell = tr.insertCell(2);
cell.innerHTML="<a href='#' onclick='editRecipient("" + sLName + sFName + "",""+"ZOne-Time"+"");' Title='Click to edit the provider information.'>" + sName + "</a>"
cell = tr.insertCell(3);
cell.align='center';
cell.innerHTML="<a href='#' onclick='return editFaxNumber("ZOne-Time","" + sLName + sFName + "",this);'>" + sFaxNum + "</a>";
} else {
//update an existing row
var i=iGetRowNum(sTR);
if (i>0) {
var tr=document.getElementById("tblContacts").rows;
tr.cells[2].innerHTML="<a href='#' onclick='editRecipient("" + sTR + "");' Title='Click to edit the recipient information.'>" + sName + "</a>"
tr.cells[3].innerHTML="<a href='#' onclick='return editFaxNumber("ZOne-Time","" + sTR + "",this);'>" + sFaxNum + "</a>"
}
}
Expect something like:
_popup("winID")._cell(_table("tblContacts"), 0, 0)._click(checkbox("chk_...")
RR
Below is a snippet of HTML to show the complexity:
if (sTR == 'NEW') {
var tbl = document.getElementById("tblContacts");
var i = iFindInsertRowNum("ZOne-Time", sTR);
var tr= tbl.insertRow(i);
tr.id="tr_"+sLName+sFName;
//<tr id='tr_PH_BJ1119100326_23' >
// <td align='center' width=40px><input type='Checkbox' ID='chk_PH_BJ1119100326_23' value='PH_BJ1119100326_23'></td>
// <td>Referring MD</td>
// <td><a href='#' onclick='editProvider("PH_BJ1119100326_23","Referring MD");' Title='Click to edit the provider information.'>Robert Kaplan</a></td>
// <td align='center'><a href='#' onclick='return editFaxNumber("Provider","PH_BJ1119100326_23",this);'>asasfdasfd</a></td>
//</tr>
var cell = tr.insertCell(0);
cell.innerHTML="<input type='checkbox' id='chk_" + sLName + sFName + "' checked/>";
cell.align='center';
cell = tr.insertCell(1);
cell.innerText="One-Time Recipient";
cell = tr.insertCell(2);
cell.innerHTML="<a href='#' onclick='editRecipient("" + sLName + sFName + "",""+"ZOne-Time"+"");' Title='Click to edit the provider information.'>" + sName + "</a>"
cell = tr.insertCell(3);
cell.align='center';
cell.innerHTML="<a href='#' onclick='return editFaxNumber("ZOne-Time","" + sLName + sFName + "",this);'>" + sFaxNum + "</a>";
} else {
//update an existing row
var i=iGetRowNum(sTR);
if (i>0) {
var tr=document.getElementById("tblContacts").rows;
tr.cells[2].innerHTML="<a href='#' onclick='editRecipient("" + sTR + "");' Title='Click to edit the recipient information.'>" + sName + "</a>"
tr.cells[3].innerHTML="<a href='#' onclick='return editFaxNumber("ZOne-Time","" + sTR + "",this);'>" + sFaxNum + "</a>"
}
}