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.

_scriptStatus help

jason.hamerjason.hamer Members
edited November -1 in Sahi - Open Source
I want to change the values I am getting from script status. below is my code but for some reason it is not working.


function DetermineResult(status)
{
var buildnumber = _getText(_span("ctl00_ctl40_VersionLabel"));
// if the build number exists it should contain a period.
if(buildnumber.indexOf('.',0) == -1)
{
// no build number
return "Inconclusive";
}

// build number found now test status
if(_scriptStatus == "FAILED")
{
// test failed
return "Fail";
}
// we have a build number and the script was successfull
return "Pass";
}

Call function like so:
DetermineStatus(_scriptStatus);

Comments

  • narayannarayan Administrators
    Hi,

    DetermineStatus(_scriptStatus);
    should be
    DetermineStatus(_scriptStatus());

    if(_scriptStatus == "FAILED")
    should be
    if(status == "FAILED")

    Regards,
    Narayan
Sign In or Register to comment.