Running Sahi on Android

info Follow the IPad instructions to run Sahi on an Android device.
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) For newer Android versions (after 2.3.3), start the emulator using
cd D:\Experiments\android-sdk-windows\tools
emulator.exe -avd sahi -scale 0.7 -no-boot-anim -http-proxy http://localhost:9999

Configure the proxy on the Emulator's browser (for 2.3.3):

  1. On the emulator, navigate to Home > Menu > Settings > Wireless & networks > Mobile networks > Access Point Names > TelKila
  2. Change Proxy to
  3. Change Port to 9999 NOTE: is your localhost's IP as seen by the Android emulator NOTE: For Android versions > 2.3.3, proxy is already configured via the emulator parameter "-http-proxy http://localhost:9999".

Configure Sahi browser_types.xml

  1. Open Dashboard -> Configure -> browser_types.xml
  2. Before the closing
</browserTypes> add
  <options> shell am start -a android.intent.action.VIEW -d </options>
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
warningLIMITATION: Android Emulator does not work with the proxy for HTTPS sites. The device however will work.