Introduction
Using Sahi
Sahi APIs
Sahi Scripting
F.A.Q.
Trouble Shooting
(View Online Docs)
Using Sahi
Quick Tutorial
Prerequisites
Download Sahi Pro
Install Sahi
Upgrade Sahi
Start Sahi Dashboard
Recording through Sahi
Add assertions
Playing back
View Logs
Edit the recorded script
Running a test from command line
Suites - Automating playback of multiple scripts
Best Practices
Basic Recommendations
Advanced Team Recommendations
Language Recommendation
Upgrade
Post Upgrade step for MySQL
Post Upgrade step for MSSQL
Post Upgrade steps for all installations
Configuring Sahi (Basic)
Configure Browsers in Dashboard
browserType Node
Variables used in browser_types.xml
Other browser modifications needed
Internet Explorer 11
Internet Explorer 10
Opera
Safari
Configure SSL
Enabling weaker algorithms on Java 1.7 and later
For Linux
For Mac
External Proxy
Proxy AutoConfig Script
Fixed Proxy
Configuring Proxy on Mac
Using Sahi Controller
Record Tab
Identify Elements
Action Buttons
Assertions
Evaluate Expression
Use . to get attributes
Up and Down arrows
Anchor button
Directly copy the Accessor to Evaluate Expression
Smart Dropdown for Evaluate Expression
APIs List Box
Retrieve Coordinates of a point
History of Evaluate Expression
Record a script
Record with Accessor Repository
Record Documentation
Playback Tab
With page refresh
Without page refresh
View logs
Debug during Playback
Play Scripts from a URL
Clipboard Tab
Info Tab
Sahi Script Editor
Launching the Editor
Navigator
Script Editor
Context Panel
Function Details
Accessor Repository Details
Traversing between files while function lookup
Function Creator
Search
Find and Replace
Scenario Editor
Documentation tool
Playback
Distributed Playback
Advanced Playback Settings
Scheduling a Test
Creating suites
Editor Shortcuts
Debugging Sahi Scripts
Excel Framework
Sample Excel Sheet
Loading Sahi script libraries
Executing the Excel Sheet
Play back reports/logs
Syntax
Variables
Simple variables
Assigning value returned by function
Using [ReturnValue]
Inline declaration
Inline as code
SetUp and TearDown
Creating Keywords on the fly in Excel
Data driven testing
Using External Data
When data has a single row
Case1
When data has multiple rows
Case2
Case3
Case4
Case5
Excel Framework Web UI
Launching the Scenario Editor
Introduction to the Web UI
Key features
loadSahi
Detail box
Red colored notification
List of shortcuts
CTRL combination shortcut keys
ALT combination shortcut keys
Function keys
Other useful shortcut keys
Sahi Suites
Plain Suites
Data Driven Suites
Introduction
Structure
Structure Explained
Data Driven Suites with testcases
Running Data Driven Suites
Variable $isDataPassed and _isDataPassed()
CSV Files as Suites with Tags
Demarcating multiple test case boundaries in single script
Reports and Summary
Playback on Desktop
Playback via Editor (new in 6.0.0)
Playback via Sahi Controller
Playback via testrunner
Distributed playback via drun
drun
drun_different_master
Playback via ANT
Playback on a single machine
Attributes and their description
Command to execute the above ANT target
Distributed playback via ANT
Distributed run on the same Master
Attributes and their description
Command to execute the above ANT target
Distributed run on a different Master
Attributes and their description
Command to execute the above ANT target
Email.properties file explained
Configuration file for javax.mail
Sample properties file
Email template
Distributed Runs - More Information
Smart zip (from SahiPro 6.1.0)
Distribute scripts in rotation (from SahiPro 6.1.0)
Nodes monitoring (from SahiPro 6.1.0)
Ability to register Nodes externally (from SahiPro 6.1.0)
Killing a running script/suite
Changes in staging and copied folders behaviour (from SahiPro 6.1.0)
Experimental feature: Ability to share Master and Nodes between different distributed runs (from SahiPro 6.1.0)
Web based Testrunner
Playback on Mobile
Recording for mobile devices
Sahi on iPad
Sahi on Android
Start the Emulator
Configure the proxy on the Emulator's browser (for 2.3.3):
Configure Sahi browser_types.xml
Run the test using testrunner.bat
Recording on Chromium Embedded Framework
Reports
Reports - Architecture and Flow
Understanding reports and report types
Adding logsInfo in testrunner.bat
Adding logsInfo in drun.bat
Modifying an existing reporting type
Adding a new custom reporting type
Downloading reports
Auto Refresh Logs
Filtering Network Activity
Storing Reports in MySQL
Create a Database
Creating Tables
Add MySQL Driver Jars to Sahi Classpath
Point Sahi to use the MySQL Database
Restart and Run
Trouble-shooting
Storing Reports in MSSQL
Create a Database
Creating Tables
Add MSSQL Driver Jars to Sahi Classpath
Point Sahi to use the MSSQL Database
Restart and Run
Storing Reports in ORACLE
Create a Database Connection
Add ORACLE Driver Jars to Sahi Classpath
Point Sahi to use the ORACLE Database
Restart and Run
Storing Reports in PostgreSQL
Create a Database
Creating Tables
Add PostgreSQL Driver Jars to Sahi Classpath
Point Sahi to use the PostgreSQL Database
Restart and Run
Adding Jars to Sahi Classpath
From command-line
From ant
Including Sahi script globally
Flex
Introduction
Compile with sfl.swc using command line
Compile using Ant
Compile using Adobe Flash Builder (Add SWC files to Flex Builder projects)
Recording a flex application
Identification of Flex Components
Recognizing Custom Components
Performing actions on Flex elements
Relational operators in SFL
Known Issues
Tips on usage
Flex app and SahiPro version
Applet
Introduction
Automating Oracle Forms
Recording an Applet
Applet APIs
Trouble Shooting
Java security error while loading applets with Sahi
Page hangs or Sahi does not recognize any element
Applet: Delete Java Cache
Sample applet
401 Authentication
Securing Sahi for Enterprises
Using custom domain instead of sahi.example.com
Creating Custom SSL Root Certificates
Create the root certificate
Accept the root certificate on browsers
Configuring Firefox template for new root certificate
Deploying the root certificate changes on other Sahi Pro installations
Complex Use Cases
Calling Java
Calling inbuilt Java classes
Working with Java object directly in Sahi Script
Calling Java classes in Custom Packages
Accessing Your Own Custom Classes from Sahi
Sample Custom Class
Add to Classpath
Call loadProperties Method from Sahi Script
Parsing XML in Sahi
Parsing XML containing namespaces
Working with SSH
Prerequisites
Add to classpath
The Sahi Script
NOTES
Reading PDF Files
Prerequisites
Code
Reading values of editable fields from pdf
Run Sahi Scripts from Java
Problem
Java code invoking TestRunner
The Sahi script being invoked
Passing parameters into Sahi script from Java
Passing data values from the Script back to Java
Sending Emails
Sahi GUI Less (Silent) Installation
Sahi headless with PhantomJS
Documentation since Sahi Pro V4.3.2
For Windows:
For Linux:
Older Documentation (before Sahi Pro V4.3.2)
Sahi headless with Xvfb
What is xvfb?
Installing Xvfb
Ubuntu
For Fedora
For other linux
Setting up Xvfb on display 1
Running test in Xvfb headless browser through Sahi
Tweaking Sahi APIs
Accessor metadata explained
accessor_metadata JSON explained
Adding a custom element
Identifying elements by an attribute not available with Sahi
Working with Polymer
Recommendations
Sample Script
Jenkins Integration
Building the new jenkins software project
Prerequisites
Configure Jenkins
View Sahi Pro HTML Logs in Jenkins
Sahi As Documentation Tool
Recording in Documentation Mode
Viewing and Editing Document
Other Language Drivers
Java Driver
Recording Java code
Ruby Driver
Recording Ruby code
Sahi Robot Driver
Installation
Keywords
Sahi MTM Integration
Installation
MTM Bridge
Load Testing with Sahi Pro
Setting up
Reporting
Running load tests through ANT
Attributes and their description
Command to execute the above ANT target
Sahi Integration
Set Sahi Server
Get Script Directory
Get All Scripts Path In The Given Directory
Get All Available Browsers
Running the Script/Suite
Check the status of Script/Suite
Get the Suite logs
Get the Script Log
Running the Script/Suite - Distributed Run
Register Nodes to a running Suite
Cleanup after executing script
Kill a running Script/Suite
Sync Reports to Central Database
Sync to a Central Database
Manual Sync
Auto Sync
Sahi Master Machine
Trigger Email After Sync
Destination Machine (Central Database Machine)
Restrict Remote Access
Restrict Remote Access
Allow Access to Restricted Sahi Pro
Sahi Pro - Complex Use Cases
abstract
Even though Sahi Pro looks simple, it is very powerful and can handle a lot of complex use cases.
Navigate the left panel to explore.