Latest Updates. News. Insights. Ideas.

Uncategorized Archives - Sahi Pro

Sahi Pro V7.5.0 Released!

Posted by | Uncategorized | No Comments

Download Sahi Pro v7.5.0

Sahi Pro v7.5.0 is major release of Sahi Pro with significant feature additions and modifications.

Some of the main features are:

  • Java support in Sahi Framework
  • Create Accessor Repository from existing scripts
  • Password encoding in scripts
  • Desktop Automation without Browser Automation
  • Support for OAuth2 in REST automation APIs

Please have a look at What’s new in Sahi Pro v7.5.0 for details.

Sahi Pro Starter – Free Edition

Posted by | Uncategorized | No Comments

We are happy to announce the release of Sahi Pro Starter, a limited functionality, free version of Sahi Pro.

It allows record and playback, editable scripts, automatic waits, stable accessors and inbuilt reporting.

The codebases of Sahi OS and Sahi Pro had been steadily diverging in the past few years and scripts from OS could not be easily used with Sahi Pro. Also support for shadow DOM, HTML5 websites could not be easily ported to the OS version. The new Chrome versions also started imposing restrictions around SSL certificates, restricting the usability of Sahi OS on modern https websites.

Sahi Pro Starter removes these restrictions and is in sync with Sahi Pro. It supports SSL sites, HTML5 APIs and all the latest browser automation goodness of Sahi Pro. It also makes upgrading to Sahi Pro easier.

Automation testers could also use it as a Selenium IDE alternative. Sahi Pro Starter works on all browsers and operating systems.

Here is a brief introduction video of Sahi Pro Starter.

Read documentation: Sahi Pro Starter
Register for Sahi Pro Starter free license
Download Sahi Pro Starter

Keeping Pace with Product Evolution-Talk at STeP-IN Conference

Posted by | Uncategorized | No Comments

Our CEO Mr. Narayan Raman presented at the recently concluded STeP-IN Software Testing Conference in Bangalore. This talk was on testing evolving applications. When applications evolve, test automation code starts failing. If tests are not fixed quickly, automation code becomes stale and the whole suite becomes unusable. Changes to applications follow specific patterns. Knowing these patterns helps create automation frameworks which can handle them easily. The talk covered examples on how web applications evolve, how they break automation code, and how we can structure the automation code such that there is minimal change required to accommodate changes.

Click here to download the full presentation

Sahi Pro V7.0.0 Released!

Posted by | Uncategorized | No Comments

Download Sahi Pro v7.0.0

This is a major release. Sahi Pro v7.0.0 is major rewrite of Sahi Pro. It was required to allow support for technologies other than web.

Sahi Pro Desktop Add-on has been introduced which supports Windows and Java technologies.

Please have a look at What’s new in Sahi Pro v7.0.0 for details. Please do not upgrade without reading the above documentation, since some changes may break your existing scripts.

Sahi Pro Chrome 58+ SSL certificate fix

Posted by | Uncategorized | No Comments

NOTE: Post modified on 5 May 2017 with updated patch.

Chrome 58 has introduced a check for Subject Alternative Name in SSL certificates. Sahi Pro’s certificate creation mechanism did not support this, causing https sites to fail on Chrome 58 (and higher).

The error seen on Chrome is ERR_CERT_COMMON_NAME_INVALID

Our initial patch released on April 22nd 2017 fixed it, but sites with IP addresses and domains which started with number in any of its components were still failing (for all browsers). This patch fixes these issues.

To fix both these issues, download the file, and follow the instructions in the README.txt file.

This patch can be applied on Sahi Pro v6.3.2 and Sahi Pro v7.0.0

Common mistakes while using Sahi Excel Framework – Data Driven Testing

Posted by | Sahi, troubleshooting, tutorials, Uncategorized | No Comments

Sahi Excel Framework is a powerful feature which bridges the gap between domain experts and automation engineers. We had highlighted Sahi Excel Framework in our Five Questions Series here:

In this post, we intend to highlight the common mistakes people make while using Sahi for Data Driven Testing

Syntax and Data File Errors:

  • Missing = after the variable name.
    Some testers seem to read the external file and store the data (array) in a variable. They miss out the = after the variable name.
    Incorrect Usage:
    variableName _readCSVFile(“fileName”)

    Expected Usage:
    variableName= _readCSVFile(“fileName”)Error

  • A common mistake observed was the usage of _readCSV, _readExcel instead of _readCSVFile and _readExcelFile.
  • Using the incorrect API to read the external files
    There are three APIs you need to be aware of: _readCSVFile, _readExcelFile and _getDB. You need to use these APIs based on where you are saving your test data which could be CSV, Excel or a database.
  • First column is not empty. There should not be any data under the first column header.
    Expected: BlankColumn
  • Mismatch in the header names. The data from the column will not be considered if the header name doesn’t match in the scenario file and data file.
  • Keyword and Data are not enclosed in square brackets
  • Instead of [variable:header:columnName], many testers have used [variable:header.columnName] They have used . instead of : and you would notice that the values would not be picked up for the fields.

Which other issues have you encountered while using Sahi Excel Framework for Data Driven Testing? Do let us know through your comments.

Sahi Pro Plus – Native Desktop, Mobile, Java automation

Posted by | Uncategorized | No Comments

Over the past year we have collated a lot of success stories from our customers as case studies. In many of our conversations, we were told that while we solved the web problem well, there were still bits involving desktop applications, java applications, Web Services, mobile and other technologies which leave gaps in the automation.

So we set out to make Sahi usable across a business enterprise, enabling automation of all those technologies. We are very close to the release of Sahi Pro Plus, our new offering which will have Windows desktop automation, Java UI automation (as desktop apps or as applets/jws), REST API automation and Android native application automation. All these technologies will follow the same familiar path of identification and recording via the Sahi Controller, easily scriptable with Sahi script or Java and executable via editor, command line or ANT.

We will soon be releasing Sahi Pro Plus. Look forward to more posts on Sahi Pro Plus. If you are interested in an early access release to test against your applications, or if you would like to talk to us regarding Sahi Pro Plus, please email us at support(at)

Sahi Pro: much more than an automation tool

Posted by | Uncategorized | One Comment

Everyone understands that software testing plays an important role in the overall quality of the product. When we test software, we would expect the teams to test on as many different quality criteria as possible, especially when we would like to expose the risks associated with different quality criteria. Gone are the days when something functional was accepted. Today, customers switch to your competitor the moment they see a dip in the quality of your product. This makes it imperative to have all the corners covered.

Functional Testing
Welcome Sahi Pro in to the picture. Many of you know Sahi Pro as The Tester’s Web Automation Tool. In this blog post, I want to highlight how Sahi Pro can help you cover multiple quality criteria with ease. Most of the testing cycles start with functional testing, smoke tests at the tester’s end. Sahi scores well in functional testing in terms of the following:
– Easy identification of elements
– Provides alternatives to element’s accessor
– Usage of Relational APIs ( which lets Sahi relate one element to another
One can use Sahi Pro to test each component individually without facing any problem w.r.t element identification.

Web Services
Sometimes, the UI is not ready for testers to test but the backend is ready and can be tested. If your application uses REST protocols, Sahi Pro comes to your help. Sahi exposes RESTRequest and RESTResponse APIs to work with REST APIs. So many times, everything seems to work fine at the UI layer and fails at the backend. This type of testing will help you understand and pinpoint the exact problem. Feel free to check out how you can use Sahi Pro to access Web Services through REST APIs here:

Data Driven Testing
You would also like to perform data driven testing on your application after your smoke tests no longer fail. You can also use Sahi Pro to test with a variety of test data. You could cheat sheets like Test Heuristics Cheat Sheet or You Are Not Done Yet to design your test data. More information on how to use Sahi Pro for data driven testing is here: driven testing

Even though you are confident of the application’s capability to handle any kind of data thrown at it, you would definitely worry on how the different browsers render your application content. With the constant battle among browsers to gain supremacy, you never know which browser and to be more specific, which browser version might be the nemesis for your support team.

Most Popular Browsers compiled by W3Schools

Most Popular Browsers compiled by W3Schools

Cross-browser Compatibility
So, it is a wise idea to test across browsers and browser versions. Imagine how much time it would take from your testing team’s schedule to test every browser and latest and two previous versions. Add Sahi Pro to your arsenal and Sahi Pro with its powerful multi browser and parallel playback features reduces your testing time for cross-browser compatibility by half. You need not even write any code for capturing screenshots on failure. Sahi automatically waits for page loads and captures screenshots on script failure.

Load Testing
You can now focus on load testing of the application. Sahi Pro lets you run load tests on your application. There are 2 Sahi scripts involved in this. One is used to generate the load. This script is called the noise and is run on a headless browser. The steps in the noise file are generally in an infinite loop so that they never terminate. The other script is called the subject. The subject is the script whose steps you would like to measure periodically at different loads. More details on how to configure and execute is here:

Localization Testing
Happy with the results so far, you now focus on your customers who are all around the world. You take a lot of pride in claiming that your application supports 10+ languages. As a tester, how confident that there are no missing strings or ui issues like overlapping, truncation or text bleed. Will you manually navigate to every screen and see if there are any English strings instead of the localized language? Fear not, use Sahi Pro, enable documentation checkbox to take screenshots at every step and use the power of _setLanguage API by Sahi Pro. Your localization testing is also taken care of. Details on the pre-requisites and configuration can be found here:

Finally, you could also integrate with your build system and let Sahi Pro run the tests every time a build is triggered. You focus on the thinking part and let Sahi Pro take care of validating the builds and email you the status of the test suite. Your regression suite can be fully automated and you focus on the new changes, the discussion meetings and the cognition process.

If you have followed us so far, you now know that Sahi Pro can be used for
– Functional Testing
– Web Services Testing
– Data-Driven Testing
– Cross-browser compatibility
– Load Testing
– Localization Testing
– Regression Testing

Feel free to download a fully functional version of Sahi Pro from and contact us at support[at]sahipro[dot]com if you have any questions.

Happy testing!!!

First Sahi Pro Meetup – How did it go?

Posted by | Uncategorized | No Comments

The first meetup of Sahi Pro was successfully organized.

Date: 26th Aug, 2016
Time: 3 pm to 6 pm IST
Venue: Tyto Software Pvt. Ltd., 1st Floor,
B.C.P. Towers, 386, 9th Main,
HSR Layout, Sector 7,
Bangalore 560102

We had three attendees and we started with a comprehensive demo of Sahi Pro’s features. After the demo, we answered the questions asked by the attendees with respect to their application. They were in the evaluation stage and were in need of an automation tool.
The attendees were pleased with the support they received in the meetup and we were happy that we conducted the first meetup of Sahi Pro to the satisfaction of the audience. Stay tuned for details about the second meetup of Sahi Pro.

Sahi Pro Meetup

Feel free to contact us at if you have any questions regarding Sahi Pro. Till next time, happy automating.

Team Sahi Pro’s solution at the Test Automation Contest

Posted by | Uncategorized | No Comments

After the blog post here, we asked Rahul Verma if we could publish our solution on this blog. We were concerned about the same problem given in future contests. After getting a go-ahead, we are here to publish and describe our solution. The application for this contest was “WordPress”. There were three scenarios to be automated within three hours. One of the main requirements was that these scenarios should run unattended.

Scenario 1: Publish five unique blog posts. Verify that the blog posts have been published successfully.
Scenario 2: Create a user and login with the created user.
Scenario 3: Search for a particular post and delete the blog post.

Our Approach:
We used Sahi Pro to automate these scenarios. We followed what we recommend to our users:
– Record with Accessor Repository enabled and create snippets of code
– Extract functions and use functions library
– Create Scenario files (.s.csv)
– Keep the data external to the script and call the file when required
– Club the scenario files into data driven suite (.dd.csv )
– Added tags for each scenario
– Execute .dd.csv from ant target

So, the final .dd.csv file is as follows:



Here, we are running three scenario files and tagged these scenarios with tags – all and scn1/scn2/scn3.
The scenario file for the first scenario is as follows:
We are logging in to the application and adding five unique blog posts. Once the posts are posted, we are verifying and finally logout of the application.



Let me describe the components of a scenario file here.
The first line of a scenario file is the column header – TestCase, Key Word, Argument 1, 2.
loadSahi loads the Sahi script with required function definitions. In this case, we are loading ‘blogARBlog.sah’ and ‘createBlogPost.sah’. blogARBlog.sah is the Accessor Repository file which we will know in detail later.
We are reading the data from an external file. In this case, it is a CSV file. So, we are using the _readCSVFile API
[Documentation] is useful for documentation purposes. One can note the purpose of the test case here.
In the [Data] [data:Posts:title] [data:Posts:content] [data:Posts:title], we are reading the data from the Posts.csv as per the column headings.
The other keywords are functions – login, addPostsAndVerify, logout.

As per our recommendation to our users, we also extracted functions and saved it in a separate functions library file.
The functions library file and the first script file is as follows:




createBlogPost.sah (Part 1)

createBlogPost.sah (Part 2)

createBlogPost.sah (Part 2)

We also used the Accessor Repository file in our scripts. This prevents the same element from being identified in multiple ways in different scripts. If there are changes expected in the element’s accessor, we need to update at only one place – the Accessor Repository (AR) file and all the scripts which include the AR file will be updated. This saves a lot of time and effort. The AR file for the first scenario is as follows:



And to identify the elements, we used our powerful recorder and object identifier which works on any modern browser. Once we ran the scenarios, the logs were automatically generated.






Finally, we generated the Ant Target and added to build.xml, configured Jenkins and ran the ant command from the command line.

Some of the unique features of our approach:

  • We did not use any waits throughout the whole exercise. Sahi Pro automatically waits for the whole page to load. It also waits for all the AJAX activities to complete. One need not add any explicit wait.
  • The use of relational APIs like _near which ensures that  the elements are identified in relation to an element we are sure of, which will not change its position.
  • We recorded on one browser and without any change in the script, we can play it back across browsers. We could also do a parallel playback using Sahi Pro.
  • Sahi Pro came up with the reports after playback without us writing any extra code.

You can download the code for the whole exercise here: stepin

If you also used Sahi Pro in the competition and followed a different approach, feel free to share your approach with us. Hope you liked our solution. Till next time, happy testing with Sahi Pro!


Team Sahi Pro – runner up in the Test Automation Contest at STeP-IN SUMMIT 2016

Posted by | Uncategorized | One Comment

Team Sahi Pro believes in continuous learning and we nominated ourselves for the Test Automation Contest conducted by STeP-IN Forum as part of STeP-IN SUMMIT 2016. Each team could have up to five members. We went with three members – our lead developer Kshitij Gupta, our support guru Pratik Shah and yours truly me (Ajay Balamurugadas). As soon as we got the email from the organizing committee about the pre-requisites, we kept asking them questions about the contest – the format, the purpose of VM, pre-requisites and what else was necessary from our side. Once we understood the expectations, we had all the pre-requisites in a pen drive and ready for the contest.

Contest Day:

We arrived on time for the contest and ready for the instructions. There was only one socket working in the power strip near our table. We quickly got it replaced and tested it. Then, once the pen drive was given to us with the VM image, we faced issues w.r.t network and BIOS settings. Virtualization was disabled in BIOS settings. Rahul explained the different types of networking modes like Host-only, Bridged and NAT. The volunteers from Test Mile helped us get ready for the contest. We received the problem statement at 9.35am. We quickly read the instructions and jumped to asking questions. It was soon announced that we will get time for asking questions.

There were three scenarios to be automated and the criteria to get selected for the final round was straightforward. The teams that had the scenarios automated would be through to the next round. There were a total of 32 teams participating and only 8 final slots. While Pratik started with the first scenario and Kshitij started working on the second scenario, I took the role of a business user who would keep cross checking the implementation against the requirement document. I took the role of timekeeper and noting down the team’s progress in a notepad.

Test Automation Contest

120 mins left for the contest to end:
We were clear on what to achieve at the end of the three hours and the progress was steady. None of the scenarios were automated till now. Work on the third scenario was not even started. At the same time, we thought that whatever we did till no was without any errors.

60 mins left for the contest to end:
Both the first scenarios were automated and the code was on two different machines. We also asked clarifying questions to the judges and were ready with some features that were over and above the expectations. While Kshitij refactored his code for scenario 2, Pratik ensured that his scenario 1 code worked without any errors. We wanted both the code snippets to be consistent with each other. So, we were also cross-checking the function names, password masking and the comments. Backup of each scenario was emailed to all of us.

30 mins left for the contest to end:
By now, we had integrated the code and started work on the third scenario. Some of the merge issues were resolved quickly. There were also some issues with Accessor Repository files. Each scenario was played back individually and the problematic line was identified. Though we were tempted to hard code the value due to lack of time, good sense prevailed and we troubleshooted it the right way.

15 mins left for the contest to end:
We started our work on Jenkins Integration and we tested our code on both the machines. One of them did not have Jenkins configured. As the clock struck 1pm, we were asked to close the laptops, wait for judges to judge us and head to lunch. We were satisfied with what we had achieved. Before we left, we had started the playback to verify one last time. The slides were also ready with our progress timeline, approach and the CTC (Challenges, Team work and Components) used. Then, judges came to us and asked to demonstrate our work. They checked if our code worked, which tool we used and the approach we followed. There were few questions asked and we confidently answered all of them to our satisfaction

After a good lunch, we were back to know who had qualified for the final round. We waited for more than 15 mins and we still did not know if we had qualified for the finals. Then the team names were announced. We were in the top 8. We were ready with the tweet and as soon as the name was announced, we pressed the ‘Tweet’ button.



It was time for the presentations to begin. We were third in the presentation order. We connected our laptop and the HDMI cable to the projector. The input was not detected. We were given some time to sort it out. We tried installing drivers but it did not help. We had to try with the other laptop but remember, it did not have Jenkins. We quickly configured Jenkins on this machine and we were ready for our presentation.

Presentation Time:
We presented our approach, the code for each scenario, the challenges we faced and how we solved each challenge – the latest challenge being the HDMI connectivity issue. We also demonstrated our code by playing back the whole code. We highlighted the strengths of this approach and answered questions on why a particular approach was followed. There were questions on which parts we worked in the three hours and which came as part of the tool pre-packaged.

Team Presentation

Time for results:
Then the results for the Test Automation contest was announced along with highlights of each of the 8 presentations by the finalists. Team Sahi Pro came second and we were happy about it. One reason why we thought we missed the first prize was Sahi Pro is so feature rich that it might look that we did not do much in the 3 hours, which is acceptable. It is a testimony to the power of Sahi Pro. 🙂

Runner Up

Our special thanks to our CTO Mr. Narayan Raman for sponsoring this team for the contest. We also want to thank everyone at Sahi Pro for making Sahi Pro – The Tester’s Web Automation Tool. Looking forward to the next contest. Till then, happy testing with Sahi Pro!!!

Five Questions Series: Sahi Excel Framework

Posted by | Uncategorized | No Comments

In the third post on the Five Questions Series, we have Sahi Excel Framework today.
Previous posts in this series: Sahi Controller and Sahi Logs.

What is Sahi Excel Framework
The Sahi Excel Framework allows testers to write their test cases in Excel and run it from Sahi. Often a testing team consists of a mix of subject matter experts, some manual testers and testers with some automation experience. Writing tests in the language of the business allows all stake holders to participate and derive value out of the automation process.

Briefly, explain the syntax of Sahi Excel Framework.


Sahi Excel Framework

The first line of the sheet is the column header. All the blank lines are ignored.
loadSahi loads the Sahi script which has the functions defined in it.
Once you save the file, all the fields under the column Key Word become drop downs and you can choose your functions from the drop down.
[Documentation] row is ignored. You can use the Documentation row to highlight your test case summary.
Arguments are the parameters you pass to the functions.
// comments the step and does not execute the step.

As a domain/subject matter expert, how do I get started?
It is straightforward. Launch Script Editor and click on New > Scenario to launch a new file. Save it and start typing the function name in any of the rows under the Key Word column. You can then select the matching functions from the drop down. Once the functions are selected, enter the arguments for each function.

Now, include the functions library by pressing CTRL and clicking on any function. A Function Details popup will appear displaying the function details. You can view the function library or include it in the Excel file.

Function Details

Function Details

Modify the description for the test case, save the file and play it back.

What precautions will I have to take while creating the functions?
The functions you create will be used by the domain experts. So, make sure that the function names are easy to understand and descriptive at the same time. For example, verifyTotal is better compared to fn1550

How are the logs displayed?
When we run the Scenarios file, the logs clearly show the status of each test case followed by the time taken to run the test case. An overall status is also displayed along with total steps, time and browser details.

Scenarios Logs

Scenarios Logs

Any other questions in your mind?
Feel free to comment or ask your question(s) and we will get back to you.

Five Questions Series: Sahi Logs

Posted by | Uncategorized | No Comments

In the second post on the Five Questions Series, we have Sahi Logs today.
If you have not checked out our previous thread on Sahi Controller, click here.

How do you configure Sahi Logs?
There is no need to configure Sahi Logs separately. It is by default in-built within Sahi Pro. You need not write separate code to setup Sahi Logs. One can access Logs by clicking on Logs link from Sahi Dashboard or Sahi Script Editor. There is an option to view logs from Sahi Controller too.

Launch Logs

Launch Logs

What are the capabilities present in Sahi Logs?
For every script/suite played via Sahi, a log file is created. On clicking on Logs link, a window with the results in HTML is displayed. One can filter the results by using pagination tool or using SQL query.


Pagination in Logs


The core capabilities include
– Logs for every script/suite
– Code Folding: When a function is called in a Sahi script, the logs for the function call are automatically “folded” in the reports
– Color coding of scripts, asserts and functions in red/green based on failure/success
– Script wise and Test Case wise summary
– Graphical representation of all scripts/suites run so far
– Comparison of suites where we can also compare screenshots, logs across scripts
– Detailed network activity for each request response

Code Folding

Code Folding



How can we monitor network activity in log files?
One can log HTTP request/response information for all network calls in the script. It is called HAR Logging. HAR refers to HTTP ARchive format of storing request response information. There are two ways to enable HAR Logging — globally or locally.

To enable HAR Logging Globally:
Add har_logging.enabled=true in and restart Sahi for this to take effect.

To enable HAR Logging Locally:
One can locally enable/disable HAR Logging inside a script using _startHarLogging() and _stopHarLogging() APIs.

An example of how HAR Logging would look is as follows:

HAR Logging

HAR Logging

Do logs record everything present in the script?
One has the option to mask certain information from appearing in the logs. Sometimes sensitive information like password, credit card details, bank account details may be entered via script, but we do not want it stored/displayed anywhere. We can then use APIs like _maskLogs to mask information and _unmaskLogs to start displaying steps in the playback logs and the Controller. This is mostly used after _maskLogs API.

Mask and Unmask Logs

Mask and Unmask Logs

How frequently are the logs updated?
Most of us want the logs to be up to date but do not like to refresh the logs page again and again. Auto Refresh Logs feature comes in handy here. By checking the ‘Auto Refresh Logs’ checkbox, the page is refreshed after every 2 seconds till the execution completes.

Auto Refresh

Auto Refresh

Any other questions in your mind?
Feel free to comment or ask your question(s) and we will get back to you.

Sahi Pro V6.3.0 Released!

Posted by | Uncategorized | No Comments

Download Sahi Pro v6.3.0

Sahi Pro v6.3.0 is a major release. A lot of new APIs for web page layout verification have been added. Suite logs now show tree structure of nested suites. The license dialog has been modified to allow configuration of License Server for concurrent users. Apart from these, it contains various small feature enhancements and bugfixes requested by customers.

Please have a look at What’s new in Sahi Pro v6.3.0 for details.

Why Sahi Pro is much more than Record & Playback !!!

Posted by | Uncategorized | No Comments

Why Sahi Pro is much more than Record & Playback !!!

We associate few experiences to some phrases. The phrases immediately trigger back the memories to us. Some famous phrases in the realm of test automation include “100% testing”, “XPATH”, “record and playback”, “GUI Testing”, “Assertions”. One such phrase associated with strong reactions is “Record and Playback”. While some hate the limited capability of the record and playback mechanism and its brittleness in relation to the mouse coordinates, others like it for the simplicity and how it can be a quick and dirty solution.

Some perceptions take time to change. I was also of the opinion that Record and Playback tools meant unreliable and something that can be used only for a short period of time. My experience with AutoIt and the struggle with the mouse coordinates did not help change the perception. And then, I used Sahi Pro. The tagline is quite interesting—“The Tester’s Web Automation Tool”. I was curious as to why it was called the “Tester’s Web Automation Tool” and not just “Web Automation Tool”. I got my answer as soon as I started to play with the tool. It starts as a record and playback tool and extends itself much beyond that.

Power of Java within Sahi

For a start, one can use Java libraries right from the Sahi Script. Sahi’s JavaScript is executed in a Rhino JavaScript Interpreter, running inside Sahi’s proxy. As Sahi scripts run on the Rhino JavaScript engine, this allows Sahi to call any Java code in the classpath of Sahi. What does this mean to someone who is experienced in programming languages? They can use Sahi Pro to write powerful scripts quickly by making use of the many Java libraries available. They can test Java classes by writing scripts.

Powerful Accessor Repository

When you record, you can have Sahi Pro create a Accessor Repository(AR) file for you by turning on the ‘Record with Accessor Repository’ option. Once a Accessor Repository file is chosen, an element will always be identified first by its AR entry, even when not in recording mode. This prevents the same element from being identified in multiple ways in different scripts. One can thereby get rid of the brittleness of the recorded scripts. There is also provision to modify existing AR entries.

Use ( . ) to get attributes

Adding a dot (.) after the accessor in the accessor field, shows all the properties of the accessor. Further typing narrows down the list of properties.


Clicking on an option (say, disabled) or typing .disabled directly in the accessor field and pressing Enter will populate the value in the “Value:” box. (In this case, .disabled is false)

Clicking on Assert will create an assertion for just that property.

Excellent logs and reporting mechanism

When record and playback tools restrict themselves to the recording of the scripts and the tester has to write code to get logs and reports, Sahi Pro is different. One does not have to write a single line of code to get the logs, reports of the scripts/suites. It’s inbuilt logging and recording feature is quite handy. One could also run SQL on the reports to get the exact report they desire.

Distributed Playback

I don’t think many record and playback tools, in fact many automation tools provide the feature of distributed playback. What Sahi Pro does is something quite amazing. You can play multiple scripts at once – on a single machine or even better across machines. Do you know any other tool which can run multiple instances of Internet Explorer on the same machine? Sahi Pro does it with ease.

Distributed Playback

With such powerful features, Sahi Pro not just relies on record and playback but is much more powerful. So, as a tester you can start with Record and Playback and build on it based on the context. Start adding assertions, create functions at the click of a button, use the common accessor repository or use the exhaustive documentation about the different APIs supported by Sahi Pro.

It is time to change your perception about record and playback tools and consider Sahi Pro to be the Tester’s Web Automation tool. Try it out here and let us know what you think. Here is the quick tutorial to get you up to speed.

Sahi Pro V6.2.0 Released!

Posted by | Uncategorized | No Comments

Download Sahi Pro v6.2.0

Sahi Pro v6.2.0 is a major release with significant fixes and enhancements.

Significant changes are:

  • Microsoft Edge Support
  • Multi Language Support: eg. record for English and playback for Japanese
  • Passing External data to Scenario files
  • Sahi Pro Runner: playback only version of Sahi Pro for CI and build systems
  • Enhancements in reports
  • License Server: for monitoring concurrent licenses

Please have a look at What’s new in Sahi Pro v6.2.0 for details.

Tyto Celebrates 5th Year Completion With 100% Increase In Sahi Pro Licenses Sold

Posted by | Uncategorized | No Comments

It is a great pleasure to share our successes with you in our 6th year of operation. We completed our 5th year last month with 350+ customers using Sahi Pro. The number of Sahi Pro licenses sold worldwide saw more than 100% increase compared to the previous year.

Our journey started 9 years back with Sahi, an open source web automation tool focused on testers. Over the years we have continued our innovative drive in Web Test Automation, and in 2014 we launched Sahi Pro 6, the latest version of the commercial product. In this new version, we added a web based editor to easily author and manage automation scripts. This intuitive user interface also allows creation of suites and triggering parallel and multi machine playback.

Sahi Pro 6 provides Image comparison APIs and better integration with Continuous Integration systems like Jenkins. Overall, we believe that the new version plugs many of those areas where we found effort being wasted. Sahi Pro 6 significantly enhances tester productivity and allows even the not-too-technical teams to adopt and reap good ROI from web test automation.

In 2014, we ramped up our marketing efforts to broaden our reach. Through case studies, we have started highlighting how our customers, especially in the enterprise software products space, have succeeded with Sahi Pro and accomplished significant cost savings. These should be helpful for existing as well as prospective customers.

Sahi Pro v6.0.0 Issues and Workarounds

Posted by | Uncategorized | No Comments

This post shall list known issues and possible fixes. All changes mentioned here will be incorporated in the next version.

Issue #1: Scripts run slower because Sahi waits for uninitiated AJAX requests also
and add
// XHR wait fix start
Sahi.prototype.areXHRsDone = eval("(0 || "+(""+Sahi.prototype.areXHRsDone).replace("null==h||0==h||1==h", "1==h")+")");
// XHR wait fix end

before the line:
__sahiDebug__("user_ext.js: end");

Restart Sahi, clear browser cache before re running scripts.

Sahi Pro V6.0.0 Released!

Posted by | Uncategorized | No Comments

Download Sahi Pro v6.0.0

Sahi Pro v6.0.0 is a major release and contains many new features and bugfixes. The focus of this release is tester productivity enhancement. Some of the key features added are: new Script Editor, better jenkins integration, browser and element level screenshots, APIs for comparing images, better reports, support for globally included global_include.sah file and many more.

Full details of all changes and enhancements can be found here: What’s new in Sahi Pro v6.0.0

Play with it today and let us know if you like the new features!

Sahi Pro V5.1.0.0 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro v5.1.0.0

Sahi Pro v5.1.0.0 is a major release and contains many new features and bug fixes. Some of the key features added are IE 11 support, CORS support, data driven suites, email notification, scenario editor for Excel framework, Sahi as a documentation tool and ability to launch multiple browser sessions in a single script. We have also added brand new documentation. A complete list of features incorporated into the release, bug fixes made, integrations possible etc., can be found here: What’s new in Sahi Pro v5.1.0.0

Sahi Pro V5.0.9 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.9
This is a bugfix release.
Below is the changelog:

26 August 2013
Sahi Pro V5.0.9 released.
This is a bugfix release.
* Bugfixes
	Fixed: IE renders correctly depending on X-UA-Compatible for ie meta tag
	Fixed: Cookie value containing extra trailing comma issue
	Fixed: Setting UserDefinedId from inside a script.
	To set the userDefinedId from inside a script, use the following code
	Fixed: For Ajax requests, Sahi will return a 401 response by default, instead of returning a custom 401 page with 200 status.
	To change the behavior, add xhr.return_401_response=false in
	Fixed: parser bug where switch statement immediately following a case statement was ignored
	Fixed: parser bug where function.bind was causing classcast exception
	Fixed: parser bug to handle unary operators in statements; like _click(_link($i++))
	Fixed: Missing added
	Fixed: Correctly showing error in logs if path is wrong while running from suite from testrunner.
	Fixed: Screenshot comparison logs in IE9

Sahi Pro V5.0.8 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.8
This is a bugfix release.
Below is the changelog:

Sahi Pro V5.0.8 released.
This is a bugfix release.

* Bugfixes
Fixed Flex for chrome and firefox
Fixed support for input events on IE - fixes angularjs problems
Fixed identifying elements across iframes from same domain but different from parent domain
Fixed _in so that it does not look for elements in frames outside of the reference element
Fixed slow running of drun tests when H2 database is very large. Added index.

Sahi Pro V5.0.7 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.7
This is a bugfix release.
Below is the changelog:

Sahi Pro V5.0.7 released.
This is a bugfix release.

* Bugfixes
Fixed Excel Framework reports
Fixed Excel Framework loadSahi script using _include
Fixed _dragDrop waits for full drag drop
Fixed bug where step starting with tab in Controller Evaluate Expression throws error
Fixed code folding related bugs which caused some Object methods to be skipped or incorrectly processed
Fixed NullPointerException in PacProxySelector
Fixed Origin request header not being sent to server: Set by default
Fixed parsing of E4X code in Sahi Script
Fixed automatic scroll up bug in Controller in some IE versions

Fixed Wrong screenshot associated with previous step
Fixed AltDblClick brings controller into focus
Fixed popup prefix when identifying flex objects
Fixed data base issue for MySQL on linux
Fixed slow loading of web based testrunner

Sahi Pro V5.0.5 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.5
This is a bugfix release.
Below is the changelog:

11 June 2013
Sahi Pro V5.0.5 released.

* Bugfixes
Fixed switch case null pointer exception when there are no statements in case
Fixed _takeSnapShot. Behaves same as _takeScreenShot
Fixed: In reports, clicking on log statements points to corresponding _log step

* Features
Added _hr API to identify html HR tag.
Added browser method sendHTMLResponseAfterFileDownload(b) in java driver

Sahi Pro V5.0.4 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.4

This is yet another quick bugfix release!

Below is the changelog:

10 June 2013
Sahi Pro V5.0.4 released.

This is a bugfix release.

* Bugfixes
Fixed Code folding for functions used as constructors
Fixed switch case parsing when case has a scope ({}) instead of a single statement
Fixed Mailer: addRecipient used for multiple to addresses
Removed Mailer SSL port hard coding
Fixed recursive includes leading to StackOverflowError
Fixed setting external proxy configuration (was broken since 5.0 after adding proxy.pac support)

* Features
Added _object to identify html tag object.

Run Sahi script on iPad

Posted by | Uncategorized | No Comments

Sahi can be used for testing the fluid nature of web apps and its functionality on different devices. In this post, we will be looking into running Sahi scripts on iPad. Before I go ahead and mention how to do this, there are few important notes about this kind of execution:

  1. You can’t install Sahi on iPad. Sahi must be installed and running on a different computer in the same network.
  2. The scripts which will be executed on iPad will not be recorded on the iPad. These scripts will be recorded on the computer itself, by resizing the browser and changing the user agent to iPad.
  3. Only the playback will be done on the iPad to check if the web app renders correctly on iPad or not.
  4. The scope of this post is only related to playing back a script on iPad. A different post will come up with the steps required to record scripts for different devices.

With these points in mind, let’s move ahead and configure our iPad for the run. While following these steps, please note that you need to use the IP address of the machine on which Sahi is running (and not the IP I am using, that is of my own machine).

  1. To start configuring the iPad, click on the settings icon on the home screen.


  2. This will open the general settings option panel. Click on the network tab:


  3. This will show all the network options that are present for connection. In the wi-fi settings click on the network that is being used by both the iPad and the machine running Sahi. I am using Tyto_24 so I will click on the arrow button next to it.


  4. This will open the settings for that particular network and show a bunch of details about the network. What we are interested is the proxy for the network. In case you are within another proxy, such as your corporate proxy, you need to make changes in the Sahi installed in your machine. Let us click on the manual button of proxy.


  5. This opens up the settings panel for the proxy. The two fields which we are interested in are the proxy and port. We need to set these ports to our computer running Sahi on port 9999 so that the iPad can use the Sahi on the machine to run the scripts.


  6. Set the proxy to the IP address of your machine.


  7. Also set the port to 9999. This will ensure that it is going to route through Sahi installed and running on the machine.


  8. Configure Safari to accept cookies always:
    Settings -> Safari -> Accept Cookies = Always
  9. Now open a Safari browser and go to the URL Replace the IP with your own machine IP. This will open the Sahi page for running script on mobile. This is similar to the playback tab of the controller where you can provide the script name and start URL for the run.


  10. Provide the name of the script at [1], the start URL at [2] and then click the run button [3].


  11. As you click the run button, you can see the page navigating away to your script run and your script will be executed now.


    The reports for this script will be available on the machine on which Sahi is running.

Sahi Pro V5.0.3 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.3

This is yet another quick bugfix release!

Below is the changelog:

30 May 2013
Sahi Pro V5.0.3 released.

This is a bugfix release.

* Bugfixes
Fixed recording of elements which have index as their first identification attribute
Fixed java.awt.Robot references which cause PhantomJS scripts to fail on linux machines without X Windows
Fixed handling of negative values in _xy() API
Fixed fetch API in ruby driver to handle both attributes and chained attributes (like rows.cells.length)
Fixed Assertion selection in Java Controller
Fixed code folding logs when functions are declared inside included files
Fixed Controller pause/step buttons. Removed current step, next step counters.
Fixed showing _wait statements in Controller.
Fixed display of time when time taken is more than 24 hours (prettyTimeMoreThan24Hours added and exposed in XSLUtils)
Fixed Recorded Steps not showing correctly in Controller
Fixed HTML reports not showing browser name when run via testrunner or Controller.
Fixed remembering "Record" button state
Fixed issue of Controller content opening on main window with blank Controller on some versions of IE

* Features
Added openWindow API in java driver to launch in different resolutions
Added _sahi.isReadyForStepDefault. This is called from _sahi.isReadyForStep which can be overridden to add custom waiting conditions.
Added JSDoc comments to apis.sah for auto-complete help in editors like Eclipse

Sahi Pro V5.0.2 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.2

This is another quick bugfix release. Sahi Pro V5.0 has a lot of significant changes to improve overall usability and performance. This also meant that we sneaked in a few bugs. Thanks to our customers to have reported bugs in the 5.0.1 release made just yesterday and helping us come out with v5.0.2!

Below is the changelog:

16 May 2013
Sahi Pro V5.0.2 released.

This is a bugfix release.

* Bugfixes
Fixed "return" statement parsing bug
Fixed testrunner for singleSession=true threads=1
Fixed JS error alert in Controller during Java playback
ignorable_ids applied only on ids. Added zk pattern
Ruby Sahi: Added support to identify elements using multiple attributes via hash
eg @browser.textbox({"name"=>"q","sahiIndex"=>2}).

* Features
Added ability to show/hide Base Url and User Defined Id based on flags in Suites List
Set XSL param showUserDefinedId to true in suites_list.xsl to show the User Defined Id
Set XSL param showBaseUrl to true to show the Base Url

Sahi Pro V5.0.1 – What’s New?

Posted by | Uncategorized | No Comments

Download Sahi Pro V5.0.1

This is a bugfix release with the following changelog:

15 May 2013
Sahi Pro V5.0.1 released.

This is a bugfix release.

* Bugfixes
Fixed "switch" statement parsing bug
Fixed Run button from mobile user interface (launch.htm)
Fixed browser type detection (launch.htm)
Fixed suite inside suite bug when start url is specified along suite.
Fixed web based testrunner to run scripts from custom paths configured via scripts.dir

Sahi Pro V5.0 – What’s New?

Posted by | releases, Sahi, Uncategorized | No Comments

Download Sahi Pro V5.0

Major Changes:

Detached Sahi Controller
The Sahi Controller is no longer tied to the same domain of the webpage that is being automated. This fixes two problems: 1) multiple controllers opening up when navigating between domains/popup windows and 2) Controller not responding to some parts of the web page

External Proxy Configuration using proxy.pac file
Many organizations use a separate proxy.pac file to configure their complex proxy rules. Sahi now can be configured to use a proxy.pac file instead of a hardcoded external proxy.

Added support to specify suites inside a suite
Suites can now be included inside other suites, allowing easier management of suites.

Script parsing done via Rhino AST parser
Sahi has moved from its previous string based parsing to Rhino’s AST parser. This allows formatting Sahi scripts in similar ways as normal Javascript files. For example, multiple actions can now be written on a single line.

Parallel browser launching enabled from java driver
Multiple browser instances can now be launched using new Browser() instances. Previously this would cause clashes in browser profiles, which has now been fixed.

_setValue bug fixed for firefox 20+
We feel stupid, but the problem was that Firefox 20 was being identified as Firefox 2 by Sahi, and hence falling back to Firefox 2’s event simulation mechanism. (Who anticipated Firefox 20 within 2 years?!) This has now been fixed.

Java 1.7 – Browser opening bug fixed
Browser launching was broken for people who moved to Java 1.7. We have fixed this now.

Proxy Configuration bug in IE10 x86 version Fixed
The proxy would be set and unset immediately on IE10 x86 version. This has now been fixed. Similar issue with Safari on Mac also is fixed.

Reporting Mechanism Optimized
The previous implementation stored execution steps in memory till the end of a script and then wrote to the database. In case of long running scripts, the memory requirements became large and if there were any OutOfMemoryErrors, the script would terminate without any logs, causing frustration and wastage. From this release, the logging is done directly to the database at each step itself, so there is no memory accumulation. Even if scripts abort in between, the logs are available till the last executed step.

Minor Changes:

Allow playback of scripts without refreshing page (“Use Start URL” checkbox added)
It has been a long time complaint from our users that Sahi refreshes the page before executing a script. We have now made this optional via a checkbox. If unchecked, the script can be set and played back without reloading the page.

Make Streaming configurable
To accommodate technologies like Comet and Server Push, we have added streaming_contenttypes.txt and streaming_urls.txt which specifically tell Sahi to stream the content without buffering.

Added Diagnose link to Dashboard
If a Sahi script waits for a long time without executing the next step, one can click on the Diagnose link on the Controller to dump the state of playback. It helps diagnose problems with Sahi indefinitely waiting for AJAX activity to subside.

Added Sahi version to Dashboard

Added feature to set java path automatically during installation of Sahi

Added setFile2 API to Sahi Java

Added Start URL in reports

New APIs added:

  • _verifyLayout: Allows verification of Page layout
  • _readLayout: Reads a simple csv like file of Sahi Elements and converts it into 2D array to be consumed by _verifyLayout
  • _includeOnce: For complex nested scripts, allows including library files only once.
  • _openWindow: Opens a new window at given resolution. Helps testing responsive layouts along with _verifyLayout
  • _windowAction: Used to perform maximize, minimize, focus, refresh, restore and close window on Windows

Download Sahi Pro V5.0

Complete Changelog

07 May 2013
Sahi Pro V5.0 released.

* Features
Parallel browser launching enabled from java driver.
Added Start URL in reports
Updated the API list for Notepad ++ plug-in.
scrollOffsets added to mouse events
Added setFile2 API to Sahi Java
Added diagnose link to Dashboard
Added Sahi version to Dashboard
Script parsing done via AST parser.
Added _windowAction API which can be used to perform maximize, minimize, focus, refresh, restore and close window
Added feature to set java path automatically during installation of Sahi.
User Agent added to initialized.htm
Added support to specify suites inside a suite.
Support provided for Microsoft SQL database.
_verifyLayout and _readLayout API created
Make Streaming configurable; added streaming_contenttypes.txt and streaming_urls.txt
_includeOnce API added
_openWindow API added
proxy selector with pac file
Allow playback of scripts without refreshing page ("Use Start URL" checkbox added)
Detached Controller implemented to allow easy recording via multiple domains/windows without opening multiple Controller windows
New playback mechanism using ping

* Bug fixes
Fixed identification of divs where each text is encapsulated by 2 divs
Fix for very slow performance of removeComments. Fixes slow loading.
Log Exception takes to the correct line number in script.
Script parsing error reporting fixed.
Fix _under in IE.
_under and _above fixed to take offsets on both sides
Mysql logging fixed
.js files fixed to be treated as single .sah file instead of .suite
HAR logging fixed
changes to terminate a load test, if the capacity is exhausted on all nodes
Fixed "Test->" assert of multiple lines from controller
Dsync fixed to copy scripts to nodes from master if master is not in list
Update of suite reports result in dload fixed
_setValue bug fixed for firefox 20
Suite report time taken format changed
fixed: reports dumped to FS
database table creation fixed
load runner fixed
Status and graph for drun fixed
drun logs for suites fixed
leftOf, RightOf fixed
domanifix with 2 parameters fixed
Fixed reports for csv based suites
test case reporting fixed
_takeScreenShot fixed
Linux certgen problem fixed

Download Sahi Pro V5.0

Sahi Pro V 4.3 Released

Posted by | Uncategorized | No Comments

Sahi Pro V 4.3 has been released.

This release brings in significant bug fixes and features

Below are the change logs:


  • _focusWindow API added – focuses windows on Windows OS
  • _takeScreenShot API added
  • Ability to automatically store and retry failed scripts during suite run
  • Added Script Explorer to trigger test cases from anywhere via web
  • Added Syntax Highlighting to Evaluate Expression box and Script Editor
  • Ability to add base64 encoded passwords in
  • Added missing Flex mx and spark components
  • Ability to add custom fields in suite reports
  • Ability to use Properties files when connecting to database


  • Array toJSON recursive_access bug fixed
  • RegExp with modifiers handled correctly
  • onScriptError logging issue fixed
  • Sahi injects properly for conditional comments
  • _setValue($a,$b) with no space after comma handled correctly
  • Fixed Excel POI APIs
  • Fixed focusin focusout events on IE9
  • sfl files recompiled with correct versions and bugfixes
  • URL history added to Controller and Script Explorer
  • Window name is blank by default. Not null. Fix for sessvars
  • Fixed bugs in logs display and code folding
  • Fixed Excel inside Excel log steps
  • javascript-xpath.js blanked by default.
  • Drag drop significantly improved. Works across scrolling panels.
  • Firefox 13 suite run fixed
  • _confirm and _prompt wait for input
  • writeCSVFile writes double quotes correctly
  • Significant fixes for memory leaks during long suite execution
  • Fixed log reporting failures due to length of message

October 2010 Update

Posted by | Uncategorized | No Comments

Hope you had a happy Deepavali.

October continued to be busy. We worked towards the next open source release, with lots of fixes and enhancements. Release was made on 3rd Nov. 2010, just before Deepavali. Part of the focus was on better integration with test management tools. A detailed post on integration shall follow. The new build can be downloaded here:

We did a 2 day online training of Sahi for Advance Internet Inc. We also delivered proof of concept of flex automation to a prospective customer in the banking domain. The flex solution does not need re-compilation of flex code, so may be suitable for environments where modifying code may not be possible.

We could not conduct a webinar last month, but we shall be conducting one on 16th Nov. 2010. Click here to join our webinar:

We are streamlining the process of support and sales for Sahi Pro online, which should be done by the end of November. Meanwhile, if you have queries on Sahi Pro, please email us at

I did get invited to GTAC on the second day, and managed to talk a little about Sahi’s object recognition mechanism. But it would have been much better if I had had time for a full presentation on Sahi. We also had discussions with the WebDriver developers to see if we could adopt WebDriver underneath Sahi. Preliminary investigations reveal that we need to wait some time for WebDriver to mature before we can adopt it. Currently WebDriver supports only one instance of IE on a machine, which may work if you had a Google farm at your disposal, but will not work for Sahi’s users who are used to running multiple IE instances simultaneously on a single machine.

Sahi API _under added

Posted by | Uncategorized | One Comment

Continuing with our tradition of innovation for simplicity, Tyto adds another wonderful API to Sahi.

NOTE: _under will be available in Sahi’s next release

The problem:

Let us take the example of a dynamically generated grid. The example we use here is available at

We wish to assert the value of “Received” column for “Style Guide for ZK 3.5 released”. If we bring up the controller and CTRL-hover over that element, what we see is
_div(“2008/11/14 13:23:07”)
which is not useful as a finder.
Looking at the alternatives listed, we notice that none of them can really help.

To fix this, we shall try using _near.

1) We put

_div(0, _near(_div(“Style Guide for ZK 3.5 released”)))
into the Evaluate Expression box, and click Highlight. This highlights the “Style Guide” element itself.
2) We experiment with the index passed as the first parameter, and using Highlight, pinpoint on the correct accessor as
_div(4, _near(_div(“Style Guide for ZK 3.5 released”)))

But this will not make a good accessor.
Because, this uses an index which seems like it would change when another column is added before the Received column.

What we really want, is that element, which is UNDER _div(“Received”).

Introducing the _under API

_under is a POSITIONAL marker. What it means is that it checks for coordinate based alignment under a particular element within a specific threshold.
So, in our case, it will look for a div which is roughly positioned underneath _div(“Received”)

Here is the final accessor:

_div(0, _near(_div(“Style Guide for ZK 3.5 released”)), _under(_div(“Received”)))

Note how this accessor is independent of the order of the rows and the columns.

And then the testers lived happily ever after …

This grid is not a simple table but actually composed of 2 tables, one for the header and one for the contents. So we could have approaced this problem using _cell(_table(2), “Style Guide for ZK 3.5 released”, 4), but again the 4 would trip us later if the order/number of columns changes.
_under(el) can be passed as a last parameter to any Sahi API.
NOTE: _under will be available in Sahi’s next release

Choosing the right web automation tool or web testing tool

Posted by | Uncategorized | No Comments

Web automation is a little trickier than most other automation because there are many combinations of browsers and operating systems and they are fast evolving too.

What do you look for before you choose a tool for web automation?

The answer may actually depend on what your organization specializes in. If you are a product company which ships applications meant only for Internet Explorer, you need not consider multi-browser support or Linux support. But if you develop outward facing web applications, you may need to test the application on multiple browsers.

Here are some factors you should consider before choosing a testing tool.

The tool:

  1. Should be techincally sound
    1. Should be able to identify elements/record on all browsers.
    2. Should handle complexities like HTTPS, Frames, IFrames, AJAX, dynamic ids.
    3. Should not need tinkering with source code of tool
    4. Should not require hard coded waits

  2. Should save time and effort for teams
    1. Ramp up time should be minimal. Users should get productive within an hour.
    2. Complexities like AJAX, dynamic ids, object identification etc. should be handled by the tool instead of passing it on to testers. *
    3. Should run reliably across browsers and operating systems to reduce re-runs and debugging effort.
    4. Should not be dependent on knowledge of various other tools/technologies.
    5. Should need minimal maintenance of scripts/code

  3. Should work with existing teams instead of requiring a drastic overhaul
    1. Should not require your teams to change from testers to developer testers, but let them easily pick up some scripting knowledge and get functional.
    2. Should not require expertise in various peripheral technologies like Java, Junit, TestNG, XPath, Firebug, Browser DOM etc. to just get started.

  4. Should require minimal stakeholders
    1. Should not need developer involvement for modification to application in the name of “testability”. Dynamic ids, elements without ids, etc. should be handled well by the tool. *

  5. Should be easy to scale testing teams
    1. Should be easy to hire and add more members to your testing team. This requires the tool to be simple to use.
    2. Should be able to move the teams across projects and products. This means that the tool needs to be sound enough to work with various technologies and frameworks.

  6. Should have authoritative support available
  7. Should be cost effective. The following need to be considered:
    1. Cost of acquiring the tool
    2. Cost of employing capable testers who can use the tool
    3. Cost of maintaining test infrastructure
    4. Cost of authoritative support

    Too often, especially with open source tools, the amount of money wasted in man hours due to limitations of the tool, incompatibility with existing expertise of team, lack of support etc. far outweighs the cost of acquiring alternative commercial tools. (Developers and testers with not much business experience invariably think that their time is not a cost to their company, and do not mind spending a week on an effort which should have lasted a day, thus wasting 25% of a month’s salary for a tool which may cost 10%)

* It is possible to just use the Sahi Controller and identify various elements reliably. Because tools like Selenium cannot record across frames, iframes, the tester is forced to learn to use Firebug to figure out what ID or XPath to use, add a line of selectFrame etc. These are very tool specific. While learning to use Firebug is an awesome skill to have, it should not be required at each step of the automation process. Adding conditional waits with knowledge of DOM is an unnecessary effort put on the tester, which can be handled by intelligent tools. Same goes for making developers add custom id generators for handling dynamic ids.

Sahi vs. Selenium

Posted by | Uncategorized | 16 Comments

Though Sahi is aimed at non-programmer testers and Selenium at programmers, we get a lot of queries on their differences. Here is a brief document which compares Selenium and Sahi.

To those who read this:
  1. If you are a Selenium fan, be open minded and verify the claims for yourself or contact us for clarification. And again, please be open minded. You may save a lot of time for yourself and your team.
  2. This document is biased towards Sahi because we built Sahi. We believe what we state is true, but if you have evidence to prove otherwise, please do contact us at
  3. When we say “Not sure” or “?” it means we do not have enough information because of lack of research on our part. Please verify for yourself.
  4. If you want a comparison between other tools and Sahi, we would be happy to discuss it.
  5. If you are another tool developer/supporter, please let us know how it compares and let the world benefit from alternatives.

Sahi vs. Selenium: Comparison document


Selenium Sahi
Works only on Firefox Works on all browsers (IE, FF, Chrome, Safari, Opera)
Has trouble recording IFrames, Frames and popup windows Can record on IFrames, Frames and popup windows
For Frames and IFrames, need to explicitly selectFrame Implicit smart identification of elements even across Frames and IFrames
Uses XPath for identification of elements if id or name not present Uses various algorithms to uniquely identify elements in a simple human recognizable way

Programming Language support

Selenium Sahi
Java, Ruby, Perl, Python, C# (and may be more). Sahi Script, Java, Ruby Sahi Script has the syntax of javascript but can interoperate with any Java code directly from script. The Java/Ruby drivers are available since Sahi V3
Needs language bridges for each new feature. For example, needs java bridge to invoke Flash via ExternalAPI. Sahi Script can directly invoke anything exposed by javascript.

Ease of use

Selenium Sahi
Easy to start with because of Selenium IDE which is a firefox plugin. Estimated start time less than 5 minutes More difficult than Selenium to start because it needs installation of Sahi. Estimated start time 10-30 minutes, depending on Java installation etc.
Deep learning curve when the need is felt to move from Selenium IDE to Selenium RC. There is only one mode of operation for Sahi. Extremely simple to learn and use for testers
Knowledge of programming language required Can achieve most automation with just functions and variables. Sahi has inbuilt APIs for most other complex tasks like data driven testing
Needs JUnit style of programming Can choose your own style
Uses XPath based identification for elements in complex html structures or those with dynamic ids. css selectors and javascript may also be used. Has nearness APIs like _in and _near which can help show nearness of elements. Eg. _image(“delete.gif”, _near(“username 4”))
Needs waits for making AJAX work No waits needed in 90% cases
Supports parallel execution Inbuilt parallel execution. Needs only one parameter change

Stability of scripts and ease of maintenance

Selenium Sahi
Smart DOM Relations resilient to UI changes No
Dependent on XPath
Difficult for testers to understand and debug
Does not use XPaths.
Uses _near and _in
Implicit waits for page load and AJAX:
1) Saves time
2) Keeps scripts simple
3) Reduces random failures
Explicit waits needed.
Ease of adoption by a team of testers Needs testers to know TestNG/Junit, XPaths, HTML structures, Frames IFrame knowledge, Javascript for AJAX conditional waits Sahi abstracts out all these for the tester.

Dependency on other tools

Selenium – Java (Others need something similar) Sahi
Needs JUnit (and optionally eclipse) to run tests No additional tools required. Tests run from the Sahi Controller/command line/ant
Non persistent reporting. Needs TestNG or something similar for that Persistent HTML reporting which can be shared via URL or file

Stability of product and number of releases

Selenium Sahi
Started 2004(?) in ThoughtWorks Started 2005 in ThoughtWorks
Version 1 took 5 years, Version 2 planned mid-2010. Moving away from original architecture to WebDriver based architecture Current release: Version 3 Number of stable releases in 2009: 7


Selenium Sahi
RC: 10.5 MB, Grid 15 MB less than 2 .5 MB with source
Not sure Runtime ~ 50MB for 3 parallel threads


Selenium Sahi
Needs external tools to create readable reports Inbuilt HTML reports with click through to relevant portion of script


Selenium Sahi
Build tool integration (ant, batch files) Yes Yes
Multiple OS support Yes Yes
Version Controllable Scripts/Code Yes Yes
HTTPS support/redirects Not sure Yes
401 Authentication, Windows/NTLM Authentication dialogs Not sure Yes
External proxy tunneling Yes Yes
In built APIs for data driven testing No Yes
Works only with browsers Yes Yes
Needs privileged modes on browsers for operation. (Privileged is bad) Yes No
Extensible on future browsers Depends on finding a way to use privileged mode on that browser Yes. Very little dependency on type of browser.
Editor support Has good editors in various languages Editor support for javascript is not as good as for Java.

Support available

Selenium Sahi
Free support via Forums Yes Yes
Paid support available Yes Yes
Authoritative training available ? Yes

Narayan Raman wins Safari Books Online’s Coder Challenge for Sahi

Posted by | Uncategorized | 2 Comments

Narayan Raman from Tyto Software won Safari Books Online’s Coder Challenge for his contribution to Sahi.

What followed was a day of good fun, interactions with the other winners, wine tasting at Kendell Jackson and Korbel wineries, a pleasant dinner and lots of discussions with Tim O’Reilly, O’Reilly Media, Paige Mazzoni, VP marketing, Safari Books Online, and CJ Rayhill, senior VP, product management and technology, Safari Books Online.

Narayan Raman and the other winners also won a three month subscription to Safari Books Online.

Narayan Raman, Ashley Aberneithy, Tim O’Reilly, Aral Balkan and Arturo Fernandez-Sanchez

CJ Rayhill, Narayan Raman, Ashley Aberneithy, Tim O’Reilly, Aral Balkan, Arturo Fernandez-Sanchez and Paige Mazzoni

Press release:

Thank you Safari Books Online for the award and the excellent hospitality.

More pictures on Flickr

Web automation does not need XPaths

Posted by | Uncategorized | 3 Comments


Learn this web automation nursery rhyme today!

XPaths are evil,
XPaths are fickle,
Developers touch code,
And the testers are in a pickle!

Have you ever used XPaths and found that it needs non-trivial amount of effort in maintenance?

Especially testers, who do not have the time or energy to get XPaths right, stay away from XPaths. Use ids or names or any other attribute the web element provides.

Sahi, since it is aimed at testers rather than developers, does not encourage use of XPath, which means that you can use it if you want, but the controller will never show you XPaths.

So how does Sahi handle something like this?

My name Edit
Your name Edit
His name Edit

Simple, Sahi uses the _in and _near APIs.

So to access the edit link of Your name, use

_link(“Edit”, _near(_cell(“Your name”)))

Like wise

_link(“Edit”, _near(_cell(“My name”)))
_link(“Edit”, _near(_cell(“His name”)))

Visit us again or subscribe to this blog for more tips on web automation …

Use fully-loaded Sahi Pro FREE for a month. Download Now Request a Demo