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.
Sahi feedback (very positive!) and missing features
This week I dived into the research on tool to use for functional testing which allows me to write scripts in Java (for web applications used mostly in IE). I looked at Rational Functional Tester, Selenium, JWebUnit, Watij and Sahi. I'd like to say that Sahi is not just a winner – actually it left no chance for competitors. At the moment I have the feeling like I found a brilliant in a trash can.
I realized Sahi to be my choice after I verified the out-of-the-box ability to:
- Deal with frame-hell and overcomplicated html (also it is nice when I don't have to specify the name of the frame I need)
- Deal with Rich Text Editors
- Deal with Tree control navigation (_near is a great thing!)
- Automatically create compact and clean Java code
There are a few things I missed. It would be great if someone suggest solutions.
1. Browser window control and screenshots.
It would be great to be able to control a browser window. As far as I understand it was not planned in Sahi so I created a "sub-framework" for my tests which gives me all I need with the help of WinAPI, AutoIt and Robot.
Still one problem remains - by default the title is the only id of a browser window Sahi provides. It doesn't seem to be reliable, so I implemented code to work with window WinAPI handlers and process pids. To get browser process pid from Sahi I had to access private fields of Browser, BrowserLauncher and ProcessHelper classes. ProcessHelper code looks a little bit troublesome and I found out that the pids list is empty when more than one IE instance exists. So I still have to invent a workaround here or to implement my own correct equivalent of PIDGatherer.
2. Ability to get all the html code in current browser.
It is strange why I didn't find the corresponding API because the html is already there (in Sahi proxy server I mean). Probably there is a way but I have no idea how to do it. The whole html (for all frames recursively) is what I want to attach to failed test report.
3. Ability to get the log of Sahi commands execution.
Again it is already there so it has to be a way to programmatically retrieve it. Thanks in advance for a hint; it would be great to attach such log to failed test report.
4. Maven support.
I had to manually prepare and add all Sahi artifacts to corporate repositiory.
5. Password encryption in userdata.properties (for proxy password).
PS. I can repost the first part of this message into "Testimonials" if it is required.
I realized Sahi to be my choice after I verified the out-of-the-box ability to:
- Deal with frame-hell and overcomplicated html (also it is nice when I don't have to specify the name of the frame I need)
- Deal with Rich Text Editors
- Deal with Tree control navigation (_near is a great thing!)
- Automatically create compact and clean Java code
There are a few things I missed. It would be great if someone suggest solutions.
1. Browser window control and screenshots.
It would be great to be able to control a browser window. As far as I understand it was not planned in Sahi so I created a "sub-framework" for my tests which gives me all I need with the help of WinAPI, AutoIt and Robot.
Still one problem remains - by default the title is the only id of a browser window Sahi provides. It doesn't seem to be reliable, so I implemented code to work with window WinAPI handlers and process pids. To get browser process pid from Sahi I had to access private fields of Browser, BrowserLauncher and ProcessHelper classes. ProcessHelper code looks a little bit troublesome and I found out that the pids list is empty when more than one IE instance exists. So I still have to invent a workaround here or to implement my own correct equivalent of PIDGatherer.
2. Ability to get all the html code in current browser.
It is strange why I didn't find the corresponding API because the html is already there (in Sahi proxy server I mean). Probably there is a way but I have no idea how to do it. The whole html (for all frames recursively) is what I want to attach to failed test report.
3. Ability to get the log of Sahi commands execution.
Again it is already there so it has to be a way to programmatically retrieve it. Thanks in advance for a hint; it would be great to attach such log to failed test report.
4. Maven support.
I had to manually prepare and add all Sahi artifacts to corporate repositiory.
5. Password encryption in userdata.properties (for proxy password).
PS. I can repost the first part of this message into "Testimonials" if it is required.
Comments
Thanks for the great feedback! My answers to your queries are below, though it looks like most of the points will need to be implemented.
1) PID Gatherer for IE. IE needs to be started with -noframemerging if it is to be in a process of its own. Please have a look at the browser options for IE given on http://sahi.co.in/w/Running+multiple+tests+in+batch+mode
2) The HTML flows through the proxy, but the actions happen on the browser. We do not have an API yet for getting all HTML recursively across frames. We may be adding one soon though.
3) As of the current release, we create logs only for the Javascript version. This is something other users are asking for the Java version too, so we would be adding it soon.
4) This too will be available soon.
5) Sounds like a useful feature. We will add this too.
And please do post it on the testimonials section! Thanks a lot for for all the positive words!
Regards,
Narayan
I reposted the first part of my message into "Testimonials" (sahi.co.in/forums/viewtopic.php?id=1816).
Thank you! I'll watch for new releases.
The problem with empty pids list doesn't depend on IE version (I had the same effect both on IE7 and IE8 with all cmd options in place). When I run unit test from Eclipse, forget to close the browser window and run another test I got this list empty which ruins my integration with AutoIt.
Not a big problem though; if it becomes a blocker I'll replace ProcessHelper with my own implementation.
And I found the other problem around ProcessHelper. The StreamReader thread suffers from the bug when the thread is locked by InputStream.read() method (see bugs.sun.com/bugdatabase/view_bug.do?bug_id=4514257). Because of that my Java program doesn't terminate when main thread finishes if I didn't close the browser window. I have to call System.exit(0) if I want to keep the browser window but have the script exited.