18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
Taking Screenshots with Phantomjs from Sahi.
I have been working on phantomjs to take screenshots of webpage when running sahi script. I can do this when I use test scripting framework like Casperjs(casperjs.org) because it exposes phantomjs interface(captureSelector) to take full webpage screenshot. Sahi does not expose phantomjs interface to take screenshots. I think it will be great addition to sahi to full integrate with phantomjs and expose its interface. Currently, you can only take screenshot of visible viewport of screen in sahi. Integrating with phantomjs will allow you to take full webpage screenshots (unless sahi already supports it). Currently , I can run phantomjs as independent process through java code to take screenshot by passing url to it. There is limitation for webpages where you need to login. It is not possible to take webpage screenshot where authentication is required. Sahi, Do you have any suggestion?
Answers
Just use this http://sahi.co.in/w/sahi-headless-execution-with-phantomjs
in conjunction with this http://phantomjs.org/screen-capture.html
I am no native english speaker and I have some problems figuring out what you want.
So, you want a Sahi API which takes Screenshots of the whole Page. This is quite possible sure, but not with the current Sahi OS. In my opinion this would be a great Addition to the Sahi API. So I totally Support your request.
There are 3 ways of getting this API.
1) Spend money on Sahi Pro or pay someone to include this into Sahi OS
2) Spend work on developing this yourself
3) wait, for anyone to develope this for you (you could create an issue here: https://github.com/headissue/Sahi/issues)
I hope this answers your question.
Please be patient with the Support. As far as i know There is a Lot work going on in The Sahi Team.
The link you provided is for multiple monitors. I would like to take webpage screenshot with spans longer than visible screen and has scrollbars to scroll down. I was able to take screenshots with casperjs and phantom js because casperjs allows me to navigate from one page to another while maintaining session alive. casperjs also provides direct interface calls with phantomjs. I am wondering if sahi has any future plans for supporting phantomjs api calls.