/
6f) Tips & Tricks

6f) Tips & Tricks

The latest versions of chrome seem to be incompatible with the version of Sahi that is included in CWB. Download a self-extracting zip file here. Extract it to a folder on your harddisk. Afterwards, edit the browser_types.xml included in your sahi installation (usually in C:\sahi-5.0\userdata\config). All references to Chrome should be changed to point to the chrome.exe file of your newly extracted zip file.



  1. When working with login tests: make sure to log out at the end of a scenario. That way, all scenario's can use login steps from a clean status. 
  2. When testing in CHROME : the sahi chrome version seems to have caching. If you experience issues with selecting brand new code, try to pause the scenario and do a hard refresh. 
  3. Easy way to change default test settings: - make a directory "dev-configs" in the user home directory of your pc and then make a file "ctf.local.properties". then  specify:fe. browser=chrome  or environment=development  
  4. To start testing start sahi first! Go to c:\sahi\bin \dashboard.bat
  5. To pause the execution of a scenario and to prevent the browser from closing when an error occurs (esp useful in development), you can either add the tag  '@pauseOnError'  to your scenario/feature or you can set the system property 'onpause.error' to 'true'. For this feature to work you need the IntelliJReporter as your console output formatter ( program argument: --format com.foreach.cuke.core.formatter.IntelliJReporter)
  6. If you cannot find elements on HTTPS websites:

    1. I.g.v. Chrome add start option --ignore-certificate-errors in the file  <SAHI_HOME>\userdata\config\browser_types.xml. Reboot SAHI. A number of popular Chrome options are:

      <options>--user-data-dir=$userDir\browser\chrome\profiles\sahi$threadNo --proxy-server=localhost:19999 --disable-popup-blocking
      --disable-save-password-bubble --disable-translate --ignore-certificate-errors --disable-client-side-phishing-detection</options>  

      Consult http://peter.sh/experiments/chromium-command-line-switches/ for a complete list 

    2.  Other browsers may have the same options, but we didn't look them up.

Blog posts

Related content

SAHI 5.0 upgrade
SAHI 5.0 upgrade
More like this
6a) Initial Setup
6a) Initial Setup
More like this
Configure Available Browsers in SAHI
Configure Available Browsers in SAHI
More like this
02 - Development
02 - Development
More like this
Scaling test execution using the ConsoleRunner
Scaling test execution using the ConsoleRunner
More like this
6h) second run
6h) second run
More like this