Playback on Mobile Devices

Since Sahi uses a proxy and injects Javascript, Sahi scripts can run on most mobile browsers.

Run From Mobile Device

  1. Start Sahi on a laptop that is on the same network as the mobile device
  2. Find the IP of the laptop (using ipconfig on Windows). We will call it the laptopIP
  3. Configure the proxy settings of the browser on the device with proxy host: laptopIP from previous step proxy port: 9999

    eg.

    proxy host: 10.10.2.50 proxy port: 9999
  4. On the mobile browser, navigate to http://laptopIP:9999/. eg. http://10.10.2.50:9999/
  5. This will open a screen which looks like this:
  6. For SSL websites, click on the crt or der links to download and install the Sahi root certificate.
    infoNote: In order to open SSL websites in iOS device, turn on SSL trust for Sahi root certificate. Go to SettingsGeneralAboutCertificate Trust Settings. Under Enable full trust for root certificates, enable trust for the certificate.
  7. Ensure that cookies are allowed in the mobile browser settings.
  8. Set the File, Start URL and click "Run" to run the script

Run From Sahi Pro Mobile Web Runner - Android

  1. Install Sahi Pro Mobile Web Runner on the device.
  2. Find the IP of the laptop (using ipconfig on Windows). We will call it the laptopIP
  3. Configure the proxy settings of the browser on the device with proxy host: laptopIP from previous step proxy port: 9999

    eg.

    proxy host: 10.10.2.50 proxy port: 9999
  4. Launch the application on the device.
  5. Configure the proxy host and port in the application and Click on Connect.
  6. You will prompt to allow Screen Cast. Click on Start Now.
  7. Once the application is connected to Sahi Pro, connection established message will be shown on the application.
  8. Open Sahi Pro Editor and select a script to execute on the Android browser.
    • Click on Playback.
    • Select Android Browser as Start Mode.
    • Select Android device.
    • Set Start URL.
    • Click on Run.
  9. infoNote: For SSL websites, open Sahi pro launcher page by clicking on Open Sahi Pro Launcher from the application. Then click on the crt or der links to download and install the Sahi root certificate.

Run From Browser - iOS

  1. Follow the step 1 to step 7 from Run From Mobile Device.
  2. Open Sahi Pro Editor and select a script to execute on the iOS browser.
    • Click on Playback.
    • Select iOS Browser as Start Mode.
    • Select device which contains Remote as part of device name as iOS device.
    • Set Start URL.
    • Click on Run.