- 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
- Sending Emails
- Other language drivers
Driving Sahi from Java, Ruby etc.
- Java
- Ruby
- Trouble Shooting Sahi
- Sahi Pro
- Sahi Pro V4.2 Documentation (PDF)
- Excel Framework
- Load Testing (Beta)
- Sahi Flex Support - sfl (Beta)
- Running tests on multiple machines
Follow the instructions below to run Sahi on Android Emulator. These were tested on Android 2.3.3
Start the Emulator
Assuming that you have an avd called sahi, start it:
cd D:\Experiments\android-sdk-windows\tools
emulator.exe -avd sahi -scale 0.7 -no-boot-anim
(The bare minimum could just be emulator.exe -avd sahi)
Configure the proxy on the Emulator’s browser:
1) On the emulator, navigate to
Home > Menu > Settings > Wireless & networks > Mobile networks > Access Point Names > TelKila
2) Change Proxy to 10.0.2.2
3) Change Port to 9999
NOTE: 10.0.2.2 is your localhost’s IP as seen by the Android emulator
Configure Sahi browser_types.xml
1) Open Dashboard -> Configure -> browser_types.xml
2) Before the closing
</browserTypes>
add
<browserType>
<name>android</name>
<displayName>Android</displayName>
<icon>opera.png</icon>
<path>D:\Experiments\android-sdk-windows\platform-tools\adb</path>
<options> shell am start -a android.intent.action.VIEW -d </options>
<processName>adb.exe</processName>
<useSystemProxy>false</useSystemProxy>
<capacity>1</capacity>
<force>true</force>
</browserType>
3) Save, restart Sahi.
Run the test using testrunner.bat
1) Click on Dashboard -> Bin
2) Run
testrunner.bat demo/clicksTest.sah http://gramam/demo/ android