SAHI 5.0 upgrade
We created a custom open source build of SAHI for CWB. Â This is the build we will use and maintain in the future. Â
Whereas most CWB projects were using SAHI OS 4.4 until now, the new build incorporates all changes from SAHI 5 along with some customization (eg. placeholder attribute support for input types). Â It is advised to upgrade to SAHI 5.0 as soon as possible.
Note that this build is specifically tailored to CWB and some of the default SAHI features that CWB does not use might be removed in the future.
Installation/upgrade instructions
Currently we only prepared a build for Windows 64 bit, if you need to make it work for another OS and can't figure it out by yourself, contact me or give a callout in the comments.
- Shutdown any running instance of SAHI
- Download sahi-5.0-win64.zip and unzip in your folder of choice (unzipping will create a base folder called sahi-5.0)
- Usually we install on the root drive, ending up with c:\sahi-5.0 - rest of the instructions assume this was the case
- If you had a previous installation of SAHI
- Compare c:\sahi-5.0\userdata\config\browser_types.xml with the version from your previous installation
- Note that some browser <options> might be different. Â If you did not modify the browser options in your previous installation, simply keep the new ones and only correct the <path> where necessary.
- Compare c:\sahi-5.0\config\sahi.properties with the version from your previous installation
- Often the Script execution params are customized, that is all properties starting with script. Â Change the values back in the new configuration file if you deem necessary.
- Copy the certificates from your old installation to the new one
- Certificates are stored by default in the <sahi-dir>\userdata\certs, though the path could be customized in the sahi.properties file
- Compare c:\sahi-5.0\userdata\config\browser_types.xml with the version from your previous installation
- Ensure that you have at least Java 7 configured in your path
- You can check this by opening a command prompt and executing java -version, the java version line should contain 1.X.* where the X is 7 or more
- If for some reason you want a specific version of Java to be used, you should modify c:\sahi-5.0\bin\sahi.bat
- Start SAHI by executing c:\sahi-5.0\bin\sahi.bat
- Check that the "browsers not found" list does not contain any of the browsers that it should find.
- Update any script references (eg Startup folder) to use the new installation
SAHI 5.0 should be running correctly at this point. Â To ensure that your CWB projects use the new SAHI at all times, you must configure the path to SAHI in the CWB properties:
- open ctf.properties file in your project
- modify the properties in section Sahi configuration (note the optional use of forward slashes in the paths to avoid having to escape values)
- sahi.baseDir should be c:/sahi-5.0
- sahi.userData should be c:/sahi-5.0/userdata
- modify any local override properties you have configured
- path to local override properties is defined in the cucumber.xml, default path is ${user.home}/dev-configs/ctf.local.properties
If you are running automated builds, you have to upgrade SAHI on every build server and ensure that the CWB properties on every server contain the right locations.
Â