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.

Script to click the browser back button

sivasiva Members
edited May 2011 in Sahi - Open Source
Dear All,

im siva,
Is there any script to click the browser back button in sahi,
if yes please kindly post the script

currently im using

_call(history.back());

but this is not exactly useful for me

i need to click the browser back button

Thanks in advance to all


Regards,
Sivakumar S

Comments

  • SumitraSumitra Members
    Hi Siva,

    You can use this script:
    <browser>
        function goBack(){
            //history.back();
            window.history.go(-1);
        }
    </browser>
    
    _navigateTo("http://sahi.co.in/demo/");
    _call(goBack());
    

    Regards
    Sumitra
  • globalwormingglobalworming Moderators
    Hi siva

    clicking the browsers back button isn't possible AFAIK. Maybe the keysPress API works with "ALT + <-", which would bring you back too.

    Regards Wormi
  • sivasiva Members
    Dear Sumitra/ Wormi,

    it's working fine. thank very much for your support


    Thanks & Regards,
    Siva
This discussion has been closed.