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.

Is it possible to export an Sahi script (.sah ) to .java file.

MuruganMurugan Members
edited November -1 in Sahi - Open Source
As a tester i am not having knowledge in JAVA ,am able to write,record and play back sahi script.
As in Selenium if a application is recorded and played back the generated script can be easily converted or exported as C# ,ruby,Java etc ,is there any possibility of the same here in SAHI.

Comments

  • narayannarayan Administrators
    You can record Sahi script in Java mode. Please refer to "Recording Java code" section in http://sahi.co.in/w/java
  • I installed latest version of sahi on linux 5. (red hat). I am trying to record in java mode by changing the sahi.properties file. The controller UI doesn't look the same as in 'sahi' mode. The record feature doesn't allow to save to a file unlike the default mode. Is this how it works?
  • Hi vivek_gondi,

    Yes,this is how it works.

    The java controller does not have save to file option but you can copy the recorded lines and paste it into your java file.

    You can now run this java file.

    For more Details:

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

    Regards
    Sumitra
  • how and where is this java file to be run?
  • see http://sahi.co.in/w/java
    and the sample_java_project in your sahi installation...

    my guess... the example on http://sahi.co.in/w/java has a main function, so command line " java yourTest.java" should run everything.
This discussion has been closed.