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.

pop up window handling

Debakanta sahuDebakanta sahu Members
edited November -1 in Sahi - Open Source
In my application when i use

var $val=_getValue(_f("abc").vbox(7));
_alert($val);

it prompts a pop up window,can i close this window.
how?

with Regards
Debakanta

Comments

  • narayannarayan Administrators
    Hi Debakanta,

    Use an _alert only while debugging scripts. Do not leave them in the script.
    If you want to write the value somewhere, use _log($val) or use _writeToFile.

    Regards,
    Narayan
  • Hi Narayan,

    Thanks for your quick answer.It is helpful for me.

    Regards,
    Debakanta
  • Hi Narayan,

    According to you I use _log($val) in my script.
    but it show the error as "undefined" , when i paste it in Evaluate expression box and click the test button present on the controller.

    code:
    var $val=_getValue(_f("abc").vbox(7));
    _log($val);

    Regards,
    Debakanta
  • narayannarayan Administrators
    During playback, _log will log into the playback logs. It writes into your log file and the function itself does not return anything which is why you see 'undefined'. Please run the script and check if the value is there in the playback logs.

    Regards,
    Narayan
Sign In or Register to comment.