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
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 Creator
Search
Scenario Editor
Documentation tool
Playback
Distributed Playback
Advanced Playback Settings
Scheduling a Test
Creating suites
Excel Framework
Sample Excel Sheet
Loading Sahi script libraries
Executing the Excel Sheet
Play back reports/logs
Syntax
Variables
SetUp and TearDown
Creating Keywords on the fly in Excel
Data driven testing
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
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
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
Reports
Reports - Architecture and Flow
logsInfo attribute
Understanding reports and report types
Adding logsInfo in testrunner.bat
Adding logsInfo in drun.bat
Adding a new custom reporting type
Storing Reports in MySQL
Create a Database
Create 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
Create Tables
Add MSSQL Driver Jars to Sahi Classpath
Point Sahi to use the MSSQL 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 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
Identifying elements by an attribute not available with Sahi
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
Sahi Pro - Sahi Suites
abstract
Suites are used to club together multiple scripts and execute as a single batch.
There are 3 kinds of suites available with Sahi