18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

sahi on android

s_ts_t Members
edited November -1 in Sahi - Open Source
hi..

when i run sahi on emulator and click on the browser button on sahi dashboard then it opens browser in that emulator with sahi homepage...


but the problem hereafter is when i press alt and double click it doesnt opens recorder...because as per emulator double clickin no any webpage wil only zoom in or zoom out that page...

so anyone here who know how to start the recorder of sahi in android emulator...please share...

Comments

  • try ctl+Alt+dblclick
  • yeah try ctrl alt doubleclick on as tablet^^
    you could also try to open a new tab on $yoursite/_s_/spr/controller7.htm
    don't forget to set the proxy correct

    Regards
    Wormi
  • fionfion Members
    Hi

    I still cannot open sahi controller in android emulator with above solutions, and Ctrl in the keyboard wouldn't work for emulator? is this the reason I can't open recorder?

    So, anyone who knows please share!
    Sahi version:3.5
    Android emulator: 2.2

    Thanks,
    Fion
  • fionfion Members
    Still waiting for somebody reply this?
  • s_xs_x Members
    If i am using a real device..let say an android device..what changes i have to make in its network settings to make it work ???
  • fionfion Members
    Hi all,

    I have new installed Android AVD v4.1, now I can open a new tab on $yoursite/_s_/spr/controller7.htm(cause the Ctrl is not work in Android), but the "record" button is not work in that controller!

    By the way, the script of mobile is the same as in the others? cause it works when I run script in Chrome(A mobile link) but not in android? the thing is the page gave me no response when I execute _click(_div("a")) in andriod(_highlight(_div("a")) it works as expected), and there is no error when run this command?

    Somebody who can answer that? please?

    Thanks,
    Fion
  • narayannarayan Administrators
    Hi,

    The sahi Controller was not meant to be run on the Android browser. You can try to record on a normal browser and then play it back on android.

    To make a normal browser return mobile content, use some tool which can modify the User-Agent header. Have a look at

    http://www.howtogeek.com/113439/how-to-change-your-browsers-user-agent-without-installing-any-extensions/

    and

    https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/

    The value of the user agent string would be something like:
    Mozilla/5.0 (Linux; U; Android 2.2; en-gb; GT-P1000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
    

    More user-agent strings: http://www.gtrifonov.com/2011/04/15/google-android-user-agent-strings-2/

    Once recorded, play it back on the Android browser using testrunner.bat instead of the Sahi Controller.

    Regards,
    Narayan
  • fionfion Members
    edited August 2012
    Hi Narayan,

    Thank you for your detail explanation to me, you mean I need to record mobile script in a normal browser(through modify User-Agent header), am I right?

    Thank you again for your time, that's very helpful.

    Fion
  • narayannarayan Administrators
    Yes Fion, that is right.

    Regards,
    Narayan
  • fionfion Members
    edited August 2012
    Hi Narayan,

    I found that sahi click some links not work in the browser with modify User-Agent header to Android, eg: Ctrl on an element, appear_div("name") in controller, and click "Click" button to execute, but the page is not loaded that way? you can try that link in mobile", www.ford.com", click "VEHICLE SHOWROOM" OR anything else, _click() does not work but _highlight() does

    Thanks,
    Fion
  • I found that above issue I mentioned with Sahi(Prod) the click also can work, but OS version just cannot click the element but highlight. Can somebody who can help me with that?
Sign In or Register to comment.