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.

How to refresh a page when meet timeout issue

JequilJequil Members
edited November -1 in Sahi - Open Source
Hi Team,

I run a test suite for a website, but sometimes when it navigate to the URL, a blank page will display, it may caused by server issue, but not sure when it will occurs, when the blank page display, the case will failed for timeout after 150s, then the firefox will automatically closed, I tried to use the _setRecovery to refresh the URL for the website, but it still timeout after 150s since the firefox is closed, do you have some way to help me refresh the page?

Comments

  • Hi Jequil,

    You can use _wait(); //time in milliseconds.

    For more details refer:

    http://sahi.co.in/w/_wait

    Also, if you want to refersh the page then you can use: _call(top.location.reload());

    Have a look at this: http://sahi.co.in/forums/viewtopic.php?id=252

    Let me know if this solves your issue.

    Regards
    Sumitra
  • I know how to refresh a page, but the case failed with 150s timeout and firefox is closed, how can I restart the firefox? The _setRecovery won't help restart firefox, so the reload won't work.
  • Hi Jequil,

    Try with try-catch block and in catch block use _navigateTo API with forceReload.

    For eg:
    _navigateTo("http://sahi.co.in",forceReload);

    This would insist the sahi to forcelly reload the page if the error occurs.

    Regards,
    Theeran.
Sign In or Register to comment.