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 Pro, ScreenShot

rogero83rogero83 Members
edited November -1 in Sahi - Open Source
I would be interested in purchasing the PRO version.
But I have not figured out how to do the screenshot of the page.
I tried the forum but the scripts do the screen captures and not the browser.

I would like to know how I could do.

Comments

  • narayannarayan Administrators
    Hi rogero83,

    You can use the _takeSnapShot API in Sahi Pro to take a snapshot. But I am not sure I understand this part of your question: "but the scripts do the screen captures and not the browser." Could you please explain?

    Thanks,
    Narayan
  • With _takeSnapShot get the snapshot of the screen but not limited to the browser.
    If I run a batch with various tests in the snapshot also appears on the console and the desktop.

    It would be possible to have only a snapshot of the browser?
  • up
  • Hi rogero83,

    Its possible to have a snapshot of the browser only if the browser is in focus. If in case any other page is opened while running the script then it will take the snapshot of the page opened and not the browser.

    Regards
    Sumitra
  • sumeetsumeet Members
    edited September 2012
    One can get the window in focus before take the snapshot. And you can try below

    _set($dt, document.title); // this will take window title
    _focusWindow($dt); // this will set the focus on window
    _takeScreenShot(); // this will take the snapshot

    But I guess you need to have browser window maximized so snapshot will be only browser
Sign In or Register to comment.