Sahi Documentation

Sahi as a Documentation Tool

abstract Sahi can be used to create simple documentation with screenshots. Manual testers can use this as a tool to create a knowledge base for other manual or automation testers. The recorded document contains the script, plus links to screenshots. It can be run as a normal sahi script too, thus helping automation testers quickly see what needs to be done. You may also like to see Documentation APIs to create documentation while execution of the Sahi script.

Recording in Documentation Mode

To record in documentation mode, check the "Enable Screenshot. Used for Documentation" checkbox before clicking "Record".

Viewing and Editing Document

Open the Script Editor for the particular script. Click on View Docs button. Notice how the script has comments with documentation information
/**
 *<screenshot>first_script.sah_images/first_script.sah_setValue__textbox__user_____test___2.png</screenshot>
 *<description></description>
 */
_setValue(_textbox("user"), "test");


Click on the View Docs button to show the script as a html document with screenshots
  1. The screenshot
  2. The script step in a readonly textbox
  3. The English version of the step. This can be edited and saved
  4. Delete Image button lets us delete images which are not very useful to the documentation
  5. Save button saves modifications to comments and images.
  6. Enter a folder/directory path and click Export as HTML to export relevant images and HTML files to the specified folder.
infoRefer here for troubleshooting incorrect screenshot in Mac.