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.

Error: Cannot find function replace in object /Sahi.*/". Why?

KarenKaren Members
edited February 2012 in Sahi - Open Source
For http://sahi.co.in/demo/, in controller, sys can find popup window by regular expression as below. But when put such code into .sah file and execute. System always alert " ERROR
TypeError: Cannot find function replace in object /Sahi.*/". Why?


_selectWindow(/Sahi.*/);
_click(_link("Visible Test"));

Comments

  • Anyone could help?
  • Hi Karen,

    Try with the following script,
    _selectWindow("/Sahi.*/");
    _click(_link("Visible Test"));
    

    This select the window with the regular expression id and performs _popup("/Sahi.*/")._click(_link("Visible Test"));

    Hope this might help you.

    Regards,
    Theeran.
  • It works. Thanks Theeran!
This discussion has been closed.