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.

Popup Window not found

sw2012sw2012 Members
edited November -1 in Sahi - Open Source
Hi Narayan,
I get some problem when I testing the popup window

A popup B
B include a table (id:mydata)

I want to check the data of rows right or not, script :

for(var $r = 0; $r < 10; $r++){
if(_popup("B")._cell(_table("mydata"), $r, 1).innerHTML != "00ms"){
_log("check row [" + $r + "] data success! ", "success");
} else {
_log("check row [" + $r + "] data false ! ", "error");
}
}

sahi logging:red error
JSERROR
TypeError: Cannot call method "_cell" of undefined

DOS window display
Window not found: popupNameFromStep=; derivedName=A; windowName=A; windowTitle=B;
wasOpened=1;

Browse : IE 8.0
Version : V3
Build : 2010-04-30

Comments

  • narayannarayan Administrators
    Hi,

    You need to use _set here:
    for(var $r = 0; $r < 10; $r++){
        var $innerHTML;
    
        _popup("B")._set($innerHTML, _cell(_table("mydata"), $r, 1).innerHTML);
        if($innerHTML != "00ms"){
            _popup("B")._log("check row [" + $r + "] data success! ", "success");
        } else {
            _popup("B")._log("check row [" + $r + "] data false ! ", "error");
         }
    }
    

    Regards,
    Narayan
  • sw2012sw2012 Members
    thank you very much , it does well~`
This discussion has been closed.