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.

Opening Sahi from command prompt

SpurthiSpurthi Members
edited November -1 in Sahi - Open Source
Can I run sahi scripts from command prompt?
eg: sahi <trail.sah> <Starting page URL>;

Comments

  • Hi Spurthi,

    You can use the suite/batch scripts to run your scripts from command prompt. Refer to this link:
    http://sahi.co.in/w/Running+multiple+tests+in+batch+mode
    Please let us know how you intend to use sahi so that we can suggest more on the same.

    Regards,
    Pankaj Kumar
  • narayannarayan Administrators
    Hi,

    In sahi/usedata/bin there are a few batch files:
    ie.bat, ff.bat, chrome.bat etc.

    You can run a test or a suite by passing it as a parameter.

    Eg.

    ff.bat mytest.sah
    or
    ie.bat mytests.suite


    mytest.sah should be in userdata/scripts directory. You can give the full file path also.

    The start url is hardcoded inside the batch file to "http://sahi.co.in/demo"

    Change it to in the bat file so that it uses your start url.

    The URL will be configurable in the next release.

    Regards,
    Narayan
  • Hi,

    Just went through the sample batch files in ../userdata/bin/
    These are simply great. I feel I need to go through sahi thoroughly.. there are a lot many changes or I should rather say enhancements in sahi.

    Thanks,
    Pankaj
  • narayannarayan Administrators
    Hi Pankaj,

    Yes, a lot of things have been added, fixed, refined.

    We have not yet documented these batch files as there is still some polish required there. (For example, removing the hardcoded urls). We will document this after the next release.

    Regards,
    Narayan
  • SpurthiSpurthi Members
    Hi,

    Thanks a lot. I'm able to run the suites from command line. Documentation helped me to clear all the problems which I've faced till now.

    Thanks & Regards,
    Spurthi.
This discussion has been closed.