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.

Change Script Directory Location

djwdjw Members
edited November -1 in Sahi - Open Source
Hi all

Is it possible to change the location of the user script directory to something other than sahi/userdata/scripts ?
The sahi controller always seems to look here, when recording and playng back.
It would make the integration in our team enviroment easier if we could set this.
I didn't find any way of changing this for the controller.
In batch mode it's no problem, I can set the batches up to read from anywhere I want.

I'm using sahi v3, build 2010-11-03

Thanks in advance,

David

Comments

  • Hi djw,
    how about "scripts.dir" parameter in sahi.properties file?
  • djwdjw Members
    Thanks, I'll try this on wednesday and report back here.

    David
  • djwdjw Members
    Hi Jirka

    I tried your suggestion of changing the "scripts.dir" in the sahi.properties file.
    Then restarting the sahi proxy, and opened the controller again.

    The change has no effect on where the sahi controller looks for scripts.
    I suspect this property is used as default when running scripts in batch mode.

    I also found a "scripts.dir" property in the props.html file, changing this also makes no difference to the controllers behaviour.

    So I'm still looking for a way to change where the controller looks for scripts.

    David
  • narayannarayan Administrators
    Hi David,

    There are 2 properties files that Sahi uses. One is sahi/config/sahi.properties and the other is sahi/userdata/config/userdata.properties

    Sahi looks for a property in userdata.properties, and if not found, looks for it in sahi.properties.

    So, even though you changed sahi.properties, since scripts.dir is also mentioned in usedata.properties, it took the value from userdata.properties.

    Change scripts.dir in sahi/usedata/config/userdata.properties, and Sahi will pick it correctly.

    Regards,
    Narayan
  • djwdjw Members
    Thanks Narayan, that works perfectly.

    David
This discussion has been closed.