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 continue automation in a failed situation

ootoot Members
edited November -1 in Sahi - Open Source
Hi,
Sahi is great.
Here is my question: I am trying to automate the execution of various test case scenarios in one script.
But incase of failure of any 1 testcase which is somewhere in between , I dont want SAHI to stop the execution
of the further test cases which are still to be executed.
I tried using _assertContainsText("Some Text", _byId("Some Text")); , But it will stop execution in condition fails.
How can i do it ?
Please give me a help. Thanks!

Comments

  • How about using _assertTrue()?

    http://sahi.co.in/w/_asserttrue
  • ootoot Members
    What adjactly we want to do using sahi script is, whenever failure occurs (where script stops executing next step) we are trying to find out the way from which we can jump to next scenario.
    Mean to say whereever script will stop, we want to treat it as pass/fail (depends upon scenario) and want sahi script to jump to next scenario (step).
    kindly let me know, if we have anyway to do it.
  • hi, I'm not sure if _continueOnError() can help.. but you may want to confirm with narayan or pankaj or stringylow
  • Hi,

    This is an old thread answered by Narayan :)
    http://sahi.co.in/forums/viewtopic.php?id=136

    Regards,
    Pankaj.
  • pankaj.nithpankaj.nith Members
    edited November 2008
    One more thing... execution stops in case of error not on failure. I will try to clear this with an example:

    Say you have put an assertion
    _assertContainsText("Some Text", _byId("Some Text"));
    now if the text is not present it is a failure and the script execution should continue past this failure also.
    but if the element _byId("Some Text") itself is not present in the webpage then it is an error and the script execution will hault here.
    I hope this will throw some light on how sahi works.
    Narayan, Stringy please correct me if I m wrong.

    Regards,
    Pankaj.
Sign In or Register to comment.