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.

Getting Sahi Diagnostics from within Java

boone1raboone1ra Members
edited November -1 in Sahi - Open Source
I would like to be able to get the diagnostics from a session that I'm running in Java, but I need to get the hidden function mentioned in this post: id=309.

_log(_sahi.getDiagnostics());

or

var $diagnostics;
_set($diagnostics, _sahi.getDiagnostics());
_writeFile($diagnostics, "D:/your/file.txt");

Does any one know how to map that Sahi script into Java?

Thanks

Comments

  • narayannarayan Administrators
    You can fetch any javascript function using browser.fetch()

    Try

    String obj = browser.fetch("_sahi.getDiagnostics()");
    I think obj would be a JSON string. Please check that.

    Regards,
    Narayan
Sign In or Register to comment.