Integrate with Existing Sahi Pro Classic Codebase

abstract Existing Sahi Pro users may want to move to Sahi Pro Flowcharts for newer projects. Flowcharts allows re-use of existing functions, scripts and suites from existing Sahi Pro Classic codebase.

Make Functions Available

By default, Sahi Pro Classic functions are not automatically visible in Flowcharts. We need to explicitly expose them.

Functions from Specific Files

If you wish to only include specific files with functions, add those .sah files to <sahipro>/userdata/scripts/flowchartsdata/<project_name>/customfunctions folder.
This is the recommended way.

Functions from All Userdata Scripts Files

If you wish to use all functions from an existing Sahi Pro scripts folder:
  1. Go to Projects page.
  2. Click on the triple dots on the top right of the desired project and click on Edit Project
  3. Check the Get custom functions from scripts directory checkbox
  4. Save Changes

Calling Custom Sahi Functions

  1. Open Add Step dialog.
  2. Keep Custom Functions checked. This will expose any custom functions.
  3. Enter the custom function name in Action field with the help of autocomplete. If the function is not visible, click the Refresh icon near Custom Functions.
  4. If the function takes any parameters, they will appear under Paramaters section.
  5. Either populate the parameter with hardcoded values, or drag and drop UI Element or Value references from the Entity Attributes on the right.
  6. Click Update to save the Step

Calling Data Driven Suites

You may wish to use Flowcharts for newer tests but want to call older existing Sahi scripts as part of a single suite/batch execution. To call existing scripts and suites inside a Flowcharts Project run:
  1. If only a single Sahi scenario (.s.csv) or .sah file needs to be run, first put it inside a Data Driven Suite (.dd.csv) file
  2. On the Flowcharts Project page, click on the dropdown near the Run button, and click on Execution Order
  3. Click on Add dd.csv button at the bottom left
  4. Choose the Script Directory, the dd.csv file name and add any tags as needed
  5. Click Save. The dd.csv file now appears in the Execution Order table
  6. If needed, drag the drag handle on the left of the dd.csv file to change its place in the execution order
When the project is run, the added dd.csv suites will also run.