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.

How do I record the browser buttons

anupama1978anupama1978 Members
edited November -1 in Sahi - Open Source
What if I want to record the back button of my Browser (Mozilla Firefox) .

Comments

  • I think you cannot do this because it has nothing to do with your webpage code... and Sahi only acts on webpage. you can try to automate actions of softwares with autoIT. Maybe narayan, pankaj or stringylow will help you if there is a solution :)
  • Hi,

    lepierrot is right. There is no way to interact with the browser buttons directly through sahi ( as far as i know :) ). If any one has some idea how we can automate clicking the back button using vbscript or batch that will help. We can then call the batch file or vbscript through sahi script. will try to do that and will return if am able to do that. :)
    Other workaround can be if you know the url then just use navigateTo() function to go to that url.

    Regards,
    Pankaj.
  • Have you tried using the Javascript history() object?

    Try using this:
    window.history.back();

    You'll get a lot more milage out of Sahi if you learn how to manipulate the web browser Document Object Model using Javascript:

    http://www.w3schools.com/jsref/default.asp
  • Thanks a ton for these ideas. Never thought of the navigator(URL) and the window.history.back();
    Shall try and get back...

    Anupama
  • pankaj.nithpankaj.nith Members
    edited July 2008
    Hi,

    Thanks StringyLow for this piece of information. window.history.back() works fine.. :)

    Regards,
    Pankaj.
  • No problem!

    I highly recommend W3Schools.com for learning Javascript and the DOM.
Sign In or Register to comment.