- Explore
Introduction, screen-shots, features, limitations
- Getting started
Prerequisites, download, install, browser configuration, record, playback, view logs
- Sahi Scripting Basics - I
Statements, variables, functions, conditions and looping, _include
- Sahi Scripting Basics - II
- Sahi APIs (built-in functions)
- All APIs
- Browser Accessor APIs
- Browser Action APIs
- Miscellaneous APIs
- Sahi Scripting - Calling Java
- Exception handling using try-catch
- Recovering without try-catch using _setRecovery
- Script lifecycle call back functions
onScriptFailure, onScriptError, onScriptEnd
- Data Driven Testing
_getDB, CSV Files, Excel, Databases
- Multithreaded Playback (Parallel execution)
suites, commandline, ant
- Advanced techniques, tips and examples
- HTTPS/SSL Sites
- Configuring an External proxy
- Adding jars to Sahi's classpath
- Configuring Browser Types
- Sahi headless with PhantomJS
- Sahi headless with Xvfb
- Sahi with Android
- Tweaking Sahi APIs
- Jenkins Integration
- Other language drivers
Driving Sahi from Java, Ruby etc.
- Java
- Ruby
- Trouble Shooting Sahi
- Sahi Pro
- Documentation (PDF)
- Excel Framework
- Load Testing (Beta)
- Sahi Flex Support - sfl (Beta)
- Running tests on multiple machines
The V2 release of Sahi has a lot of changes which makes Sahi even more powerful. Scripting has partly moved to the proxy using the rhino js engine and this should help in significant simplification of Sahi scripts. There has been one major change which may break older scripts:
Using custom functions that access the DOM.
Custom functions which access the browser’s DOM to say, identify a particular element, need to now be wrapped in a <browser></browser> tag.
Eg.
<browser>
function getEmailField(){
return _textbox("email");
}
</browser>
_assertEqual("a@sahi.example.com", getEmailField());
A general tip is to always call a browser based function from inside a Browser Action API. Otherwise they will be executed on the proxy and will fail because they do not have access to the browser’s DOM.
The other rules remain the same.
Related topics
Sahi Scripting Basics - Part 1
Sahi Scripting Basics - Part 2
Sahi Scripting - Calling Java
Scripting Changes in Sahi V2
For loops
While loops
If condition
Functions
Exception handling using try-catch
Recovering without try-catch using _setRecovery