18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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 fail the script after catch?
I have my script between Try and catch
In catch I make screenshot, if something fails and if catch is invoked.
But I want after this screenshot, the whole script to be marked as failed. Now it is marked as pass. Can I ?
In catch I make screenshot, if something fails and if catch is invoked.
But I want after this screenshot, the whole script to be marked as failed. Now it is marked as pass. Can I ?
This discussion has been closed.
Comments
i think _logAsFailure should do it
For ex.
if ($user == undefined) {
fail the script?
{
if ($user == undefined) {
_click(_link("I dont exists, I'm just here to stop testexecution"));
{
_fail("My message for failure")