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.

Stop on Javascript errors

MikeSMikeS Members
edited November -1 in Sahi - Open Source
Hello.

Is there any way I can configure Sahi to stop on Javascript errors in tests? Currently I got one test that is shown as completed, but is has a warning inside about JS errors, but I need to fail and stop test on it.

Comments

  • Um, anyone?
  • Still questioning
  • As far as i know...

    its stopping on JS errors...

    if not, please correct me and provide an example :)

    You could wrap your script in a try-catch block and then use the _logExeptionAsFailure() API.. this should stop execution.

    Regards
    Wormi
  • Hey,

    I'm also waiting for answer on this question as test case failing when i run manually due js error, but the same is passing when i run through sahi pro script. please provide where i have to update regarding to fail the automation test case for js errors. Earliest response will be great for this as i'm blocking on this scenario.
Sign In or Register to comment.