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.

Sometimes script work and sometimes it doesn't

vineet.arora3vineet.arora3 Members
edited November -1 in Sahi - Open Source
Hi Narayan,

Am not able to find out why my script shown below sometimes works and sometimes it doesn't

_call(calculateLoadTime());
<browser>
function calculateLoadTime()
{

_click(_textbox("x-auto-0-input"));
_click(_div("user 1"));

_click(_button("Add"));

_click(_textbox("x-auto-0-input"));
_click(_div("user 2"));
_click(_button("Add"));
}
</browser>

When it fails, in logs it just gives the message that "Error: The parameter passed to _click was not found on the browser
No trace available". Which _click is it talking about? Please help.

Comments

  • Hi,
    If you click on the error message on the logs, it takes you to the line, where the error occurred in the script, and also can you post your testing URL?
  • Hi boopathi,
    Error occurs at _call(calculateLoadTime()); and the url is like "http://servername.domain.net:8080/details/gen?GEN_KEY=3045". It is a GWT screen.
  • narayannarayan Administrators
    Vineet,

    In this case you do not need a browser function. Any reason you have made this a browser function?

    Regards,
    Narayan
  • If I don't put browser tag, then script doesn't work at all. Since we are clicking a textbox in a custom function, we need a browser tag.
  • I get the same situation in several of my scripts. I'm sure I have posted about it before.
  • TSheeley, did the problem got fixed?
  • narayannarayan Administrators
    Hi Vineet,
    In the calculateLoadTime function, everything seems to be Sahi's APIs. This should work properly for you:
    function calculateLoadTime()
    {
            
        _click(_textbox("x-auto-0-input"));
        _click(_div("user 1"));
        
        _click(_button("Add"));
            
        _click(_textbox("x-auto-0-input"));
        _click(_div("user 2"));    
        _click(_button("Add"));
    }
    calculateLoadTime();
    
    If it does not, please post the error logs here, or email it to support@sahi.co.in and we will look into it. If you want, we can also do a desktop sharing session to see what is wrong.

    Regards,
    Narayan
  • TSheeley, did the problem got fixed?

    No. :-)

    Most of the time, they work, but now, I always get a 'warning' that "Mgo", or "$", or whatever, is undefined.

    And sometimes "Error: The parameter passed to _click was not found on the browser".

    Even though I captured it with the controller
  • narayannarayan Administrators
    Hi,

    The warnings are javascript errors in your application. They should not bother your playback.
    When the script fails, can you watch and see what is happening during the fail? I can be available for a desktop share session to trouble shoot this.

    Regards,
    Narayan
Sign In or Register to comment.