Latest Updates. News. Insights. Ideas.

Sahi Pro: much more than an automation tool

Posted by | Uncategorized | No Comments

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.

Five Questions Series: Sahi Controller

Posted by | features, Sahi, tutorials | No Comments

Each week, we will pick a feature of Sahi Pro and hope to highlight its capabilities, benefits and tips on how to use it effectively by asking not more than five questions. We begin our Five Questions Series on Sahi Pro by focusing on Controller.

What is Sahi Controller?
Sahi Controller allows you to interact with Sahi and easily experiment and debug on the browser. Using Sahi Controller, one can easily identify elements, record and playback the scripts. One can launch Controller by pressing ALT and double clicking anywhere on the browser. Kick-start your web automation by recording using Sahi Controller and using the scripts as it is or creating functions out of the recorded snippets of code.

What are the capabilities of Sahi Controller?
Sahi Controller has many powerful capabilities spread across four tabs?—?Record, Playback, Clipboard and Info.

Sahi Controller

Sahi Controller

Record: This tab has controls to record a script. Recording is as easy as entering a name for the script and clicking on Record button. All the actions performed on the browser will be recorded and displayed in ‘Recorded steps’ tab.

One can identify elements using CTRL + mouseover and the Sahi Accessor for the element is displayed. Other actions like Click, Highlight, Set, Hover can also be performed on this element.

Action Buttons

Action Buttons

As seen in the image, each button invokes a        specific API.
  Click: _click API
  Hilight: _highlight API
  Set: _setValue API
  Hover: _mouseOver API



Assert: One can add assertions to verify if the end result is as expected. To add assertions, CTRL+mouseover an element. Click on ‘Assert’ button to view the possible assertions. It will be displayed in the ‘Evaluate Expression’ tab. Once tested, the assert statements can be appended to the main script.

Evaluate Expression: This can be used to evaluate snippets of Sahi code. Clicking on Test will evaluate the content and display the result (true/false/undefined) in the box below.

Smart dropdown for Evaluate Expression: If one wants to use Sahi API on only a part of the expression in the Evaluate Expression box, select the text and choose an action from the dropdown. This would in turn trigger an API and the results will be displayed in the box below. In this case, the ‘Is Visible’ option to trigger the API ‘_isVisible’ on the element ‘_textbox(“total”)’ is highlighted.

API on an element

API on an element

Playback: Using this tab, one can playback the scripts which are already recorded. Providing a Start URL and checking the checkbox will ensure that the script runs by first navigating to the URL mentioned. If the checkbox is not checked, the script will be executed on the current page without refreshing it.

Sahi Record Tab

Sahi Record Tab

Clicking on each of the links will open the respective window. For ex: Clicking on Logs will display the logs for all the scripts run so far. Clicking on a specific script on that page would display the specific logs.

Clipboard: This tab can be used to store small pieces of information.

Info: This tab shows the basic information of Sahi Controller, mode, browser, operating system and Java.

How are the elements on a web page identified?
Any element on the webpage can be identified by pressing CTRL and mouseover the element. The best Sahi accessor for the element is displayed by default in the Accessor field. One has the option to choose an alternative from the ‘Alternatives’ dropdown. Value shows the value of the current element. Prefix populates the prefix as needed when working with popup windows and multiple domains.

Element Identification

Element Identification

Tell us more about the Relational API and anchoring an element.
Sometimes, an element changes its position/name due to code changes and the whole script fails as the tool is not able to identify the element. To get rid of this issue, a very powerful option is Relational API and anchoring an element.

Let us take the following example where we have to identify the quantity field against “Ruby for Rails”.

Relational API

Relational API

If we identify the field in isolation, the Sahi Accessor reads:
What if three more book titles are added before Ruby for Rails. The Accessor for the field against Ruby for Rails also changes. To avoid this situation, let us anchor the label ‘Ruby for Rails’ first and then identify the field against it.

Identify Ruby for Rails field

Identify Ruby for Rails field

Anchor the field

Anchor the field

Identify the quantity field

Identify the quantity field

How does recording with ‘Enable Accessor Repository’ on help?
If ‘Enable Accessor Repository’ checkbox is checked, Accessor Repository file text field appears. Once the user clicks on ‘Record’ button, Sahi will record using Accessor Repository. In the ‘Accessor Repository File’ text field, we mention the relative or absolute path to the Accessor Repository file.

Accessor Repository

Accessor Repository

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.

When elements have been smartly identified using Relational APIs like _near or _under once, newer recordings on those pages will simply use the AR entry, so other users do not need to worry about doing it again or wrongfully using a different identification mechanism.

One important thing to note with Accessor Repository keys is that they must always be in the format $_ALL_IN_CAPS. If this is not followed, the scripts will still work fine, but the values will not come up properly in Script Editor’s context panel.

Any other questions in your mind?

Feel free to comment or ask your question(s) and we will get back to you.

Sahi Pro – Cheat Sheet for Download

Posted by | Sahi, tutorials | No Comments

When we start using powerful products like Sahi Pro, we look forward to using it to the fullest. Sahi Pro has many APIs that can help us with our testing. Some of the categories of APIs include
– File APIs
– Action APIs
– Fetch APIs
– Script Execution Control APIs
– Masking APIs

We have come up with a cheat sheet to help you refer to the different APIs at a glance. Download the cheat sheet from the below links:


Let us know what you think about the cheat sheet. Is it useful? Have we missed anything? Feel free to talk to us at support[at]sahipro[dot]com

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.

Interview with Sahi Pro – The Tester’s Web Automation Tool

Posted by | Sahi, web automation | No Comments

I am Ajay Balamurugadas and I welcome you to our weekly show where we interview one of the promising leaders of the industry. It gives me immense pleasure to introduce today’s guest. He has been a consistent performer in web automation and built a strong hold in a very competitive market. When everyone built the automation frameworks, he focused on what is important – automating the checks. His unique philosophy of helping the tester makes his tagline – “The Tester’s Web Automation Tool” the Sahi (correct) tagline for him.

Without further ado, let us welcome –
Sahi Pro: The Tester’s Web Automation Tool

Ajay(A): Hello, Sahi Pro. Welcome to the show. We are very excited that you are here today to interact with us and share your expertise. You are one of the few automation tools who is tester-friendly and gets the job done in a simple manner. Tell us about yourself and your journey.
Sahi Pro(SP): Thank you, Ajay. It is my pleasure. I started as an open source product and then due to customer commitments, I started to focus on my Pro version and fulfill customer expectations. I noticed excellent testers struggling to automate due to complex automation tools. So, I evolved to enable subject matter experts and testers to get into automation easily.

A: Yes, that is indeed strange. When everyone around you focuses on building a robust framework and turning testers to coders, you have taken a different route altogether…
S: I will not say that we have a taken a different route for the sake of being different. My thought process is continuously evolving based on the testing industry and trends. I quickly realized that most of the end users were expected to be technical programmers or automation engineers. They were expected to build a framework from scratch, get the developers write code to align with the element identification mechanism and after all this, focus on automating the checks.

I found it quite disturbing. The purpose of web automation is to automate the checks, give the testing team the confidence that the regression bugs they expected to find are not present. The tool should free up the tester’s time. Testers should explore the application and find more critical bugs. I don’t expect my users to be technically super-strong. I take care of everything to help the tester, right from identifying the elements, suggesting accessor alternatives, providing relational APIs, excellent logging and reporting, calling Java functions and libraries from my script, automatic screenshots on failure and believe it or not, I automatically wait for page loads and AJAX activities to end!!!

A: Whoa! That’s quite a big list of key differentiators! Tell us about your element identification mechanism.
S: I use my own wrappers around the Javascript DOM to identify elements. My APIs use various DOM attributes of an element to identify them. Instead of relying on a single attribute, I look for the element’s value, name, id, css class or index etc. So, I work well even if multiple elements have the same attribute value. If I am unsure about a particular element’s identification, I rely on my trusted advisor – the Relational APIs to identify one element with respect to another.

A: Many testers want to learn automation and give up as soon as they face problems in learning a particular language. What is you suggestion to them?
S: Yes, that is a common story. People are spending time learning the language more than automating the tests. I am not against anyone learning a language but let us remember why we started this discussion. A tool should enable people to automate and not set restrictions on the way. I am an extension of JavaScript and have a pretty good recorder which can create scripts for further usage. If you have never used any tool for automation, try me!!! If you already burnt your hands spending a lot of time learning a language with little success, let us pair together and see if I can help achieve your goals.

A: Are you only for newbies or can experienced folks take advantage of your prowess?
S: As I have already highlighted, my recorded scripts can be used as a good starting point for further scripting. My JavaScript is executed in a Rhino JavaScript Interpreter, running inside my proxy. As Rhino is a JavaScript runtime running inside a Java Virtual Machine (JVM), this adds a lot of power to my scripts. My scripts can directly call Java code in scripts.

A: I am sure, our readers are excited to try you and your APIs. Does anyone provide training or demo about you?
S: The folks at Tyto Software Pvt. Ltd seem to be quite helpful in this regard. Shoot an email to info[at]sahipro[dot]com or check out the documentation about me at
I also meet my friends every Thursday in a webinar at

A: Thank you for your time, Sahi Pro. We wish you all the best for your future releases and features.
S: My pleasure. All the best for your series too.

Feel free to add your questions as comments and we will get Sahi Pro to answer for you.

Five salient features of Sahi Pro that may surprise you!!!

Posted by | features, Sahi, web automation | No Comments

I have been using Sahi Pro for some time and each time I face an issue, the Sahi Documentation has been of great help to me. Apart from the documentation, one would also appreciate the number of example scripts bundled with the product. After testing Sahi Pro on a variety of applications, I could not hold myself from highlighting  few salient features of Sahi Pro that may surprise you.

Automatically waits for AJAX and page loads

The first tool I used to automate my tasks was AutoIt and I had to add lots of Sleep(5000) or WinWaitActive ( “Create a New Post”, “” , 10 ). A quarter of my code had these Sleep commands. I had realized that these commands were very powerful essential to ensure that my scripts did not fail during the demo. Then I shifted to Selenium and things were no different. My friends who used Selenium in their day to day work had explicit code for wait.

And when I started using Sahi Pro, I was surprised at how Sahi Pro automatically waits for all the AJAX activities to finish and waits till the page loads completely. I did not have to add even a single line for wait. Isn’t it surprising? What surprised me more was that it was NOT necessary to have the browser in focus.

Record in one language and playback in another language

Do you know the average number of languages the top 25 websites support? As per the Web Globalization Report Card 2015, the number is 45. Very soon, you will have your web application support multiple languages. It is quite easy to automate for English language but your customers are from different countries and use other languages.
What would be the cost of automating across languages? Think in terms of the language experts, the automation engineer effort and the confidence you get with such an exercise. Just when we thought that it would be a costly exercise, Sahi Pro comes to the rescue with the API named _setLanguage
More details about the API here.

In-built reporting system and automatic screenshots on failures/errors

It is no wonder that people love reports. Even if someone is not willing to get technical about what’s happening in the code, they want the high level reports. How the product is performing over a period of time? How are we on the automation front? When was the last time the automation suite passed without any failures?
Creating an automation suite is itself a challenging task and to build a custom reporting module is no mean feat. Sahi Pro’s reporting module is amazing and will surprise you with the clarity of reports.And every time the script fails, Sahi Pro will automatically capture a screenshot. One need not add explicit code to take screenshots.

Excel framework – Faster collaboration between domain experts and automation engineers

Sometimes, it is easier to automate scenarios than to convince people of the value of automation, done right. People resist change and fear if their jobs will be replaced by automation. Domain experts are not willing to accept that they are not strong in programming skills and automation engineers are not sure if they are automating the right stuff.

Imagine a platform for the domain expert to provide their views and the automation engineers use the input to translate it to code. Sahi Pro’s Excel Framework aims to be the platform. The domain experts need not know how the code is implemented. The intent and the implementation is clearly separated in the framework.

Call Java libraries and APIs from Sahi Script

Sahi’s Javascript is executed in a Rhino Javascript Interpreter, running inside Sahi’s proxy. Only relevant individual statements are sent to the browser for execution. The rest of the runtime happens in Rhino inside Sahi’s proxy.
Rhino is a Javascript runtime running inside a Java Virtual Machine (JVM). This adds a lot of power to Sahi scripts. Sahi scripts can directly call Java code in scripts.

Isn’t it wonderful that you can leverage the power of Java libraries and APIs directly from your Sahi Script? Add to it, the power of Relational APIs like _near, _rightOf, _under and you will be surprised at how easy it is to use Sahi.

Have you used Sahi Pro? Which features are your favorite? I have listed my favorite five. Let me know your favorite ones in the comments.

If you are new to Sahi Pro, check out the weekly webinar at

Five reasons why Sahi Pro is not for you

Posted by | Sahi | No Comments

Sahi Pro is NOT the Sahi Choice, Baby !!!

Everywhere you see, people sell you something or the other. Someone asks you to buy food from their app, someone asks you to book flight tickets while someone else is ready to help you find the right job for you. We are surrounded by products and services. Consider the field of web automation and there are at least ten products you can name right now. Are they worth the hype? That’s a different story for another day. Today, I want to highlight why Sahi Pro is not the right choice for you.  Yes, you read it right! Why Sahi Pro is not the right choice for you!!! I will give you five reasons and you can let me know which one is true in your case.

Reason 1: Already Budgeted and Approved.

You planned for the automation in your testing strategy. You finally got the plan approved by your manager. The budget for the automation team was approved. Your whole plan is ready and you love playing with XPaths.  After so many days, if you go for Sahi Pro now, all your plans will go haywire. You don’t want to risk that danger. You don’t have the courage to accept the change in plan to your manager. If this is the case, I promise you Sahi Pro is not the right choice for you. As Sahi Pro doesn’t rely on XPaths, it will expose your poor planning. So, don’t go with Sahi Pro and continue playing with XPaths and the game of thrones identifying elements.

Reason 2: Automation Engineers will lose their jobs.

You are proud of your strong team of automation engineers. You did not make the mistake of hiring a tester and turning them into bad programmers. You hired quality automation engineers and that masterstroke is still praised by many. Any requirement for automation and your engineers love it. They jump on it and finish it to everyone’s satisfaction. Everyone knows that you don’t really need specific automation experience to get started with Sahi Pro. The moment you get your hands on Sahi Pro, you will have to bid goodbye to your team members. You will be asked questions like “Why did we not use Sahi Pro till now?”, “If we don’t need automation engineers from today, why did we have them till yesterday”. Many more such tough questions would be fired to you and you will have to deal with them. The easiest way to avoid such questions is to continue the existing plan, team and forget about Sahi Pro.

Reason 3: Testers favorite and no more regression testing.

Many test leads are afraid of regression bugs (bugs found during regression testing). They delay the new feature development and focus on regression testing for many days/weeks to avoid such bugs. As of today, you ask your testers to focus on ensuring that nothing breaks due to new code/fixes. The day you get Sahi Pro, testers will love it and focus on Sahi Pro to automate the regression scenarios. Their focus will now shift to finding new bugs and take up the investigative role rather than confirming that old things continue to work.

Isn’t that a big risk you will take? More bugs would mean delayed releases and what will happen to your reputation then? Who will protect it? Better ignore Sahi Pro and let the new bugs lay hidden in the code.

Reason 4: You are too organised to like Sahi Pro.

Like every other company, you proudly advertise that your product works on almost any web browser. As you are too organised in your professional life, you love to maintain scripts for each browser separately in a separate folder. You don’t believe in the concept of one script that runs on multiple browsers. It looks like a big joke to you. Alas, Sahi Pro has the feature of One Script – Run on Multiple Browsers and hence, it fails to impress you.

Accept our sincere apologies and continue to write individual scripts to suit each browser. The last time we contacted Sahi Pro, they were not ready to remove that feature.

Reason 5: You refuse to acknowledge ‘Sunk Cost Fallacy’.

You spent money hiring a team, building an automation framework, buying an expensive tool and trying to change everything under your control to make the automation a huge success. A small change in the application is making your team put in extra hours. Everyone is able to see that it is more costly to maintain the automation scripts compared to the value by running them. Yet, you have taken it to your heart and refuse to acknowledge the ‘Sunk Cost Fallacy’.

Like many of us, you repeat this to yourself multiple times:
“We have invested so much money in it. If we stop now it will all have been for nothing.”
You are right. There is nothing called Sunk Cost. You carry on with the existing tool till you leave the job. Sahi Pro will ensure that you get out of the fallacy, which is dangerous.

Many folks have one or the other reasons not to use Sahi Pro. What about you? 

Sahi Pro helps

  • identify elements easily
  • by making life of automation engineers and testers better
  • testers to find new bugs
  • by making a single script run on multiple browsers
  • you get out of the trap and actually save money and time.

    We are just an email away: info[at]

Feel free to approach us. We love solving authentic problems. There is a weekly webinar that talks about Sahi Pro every Thursday 8.30pm to 9.30pm IST. Do attend and pass this information to anyone who would be interested.


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!

Is This Your Automation Story? – From the “NEED” to “SUCCESS”

Posted by | Sahi | No Comments

Your product simplifies business critical workflows for banking organizations. Your product has complicated workflows which are accomplished by navigating through various forms and screens of your web application. Currently you are doing a lot of manual testing. You have testers who understand your domain well and are good at identifying problem areas. These testers are not programmers, but use computers to get their job done.

Sometime back you moved to faster releases. The development could cope with it (or so they believed and claimed). But testing started lagging behind. You realize that a lot of time is spent verifying older functionality. So you start skipping some parts of it. One day your friendly customer calls and says, hey, I am no longer able to edit loans as a manager. A CRITICAL BUG! Your mature, smart testing manager resists the temptation to shift blame (thank god for that!). You discuss with her and realize the manual testers are overwhelmed by the speed of releases. Bugs are slipping through and they are frustrated.


You realize YOU NEED AUTOMATION. And that you have no clue how to go about it.

So you ask your testing head. She says she knows this tool which she has seen used in an earlier organization. You look at the cost and blanch. You still go ahead and evaluate it. You think you will just have one tester on automation then. The testers are able to understand the tool and work with it. Unfortunately it does not support some components on your web application. You are silently relieved that you did not have to justify such a cost and make the compromise of using just one automation tester!


Next you ask one of your developers. He has heard a few things and suggests that you go with product B. You ask him if he has used it. He says, he has not, but EVERYONE seems to be using it. Many of the bigwigs are using it too. It is open source and free too! Wow! – you say. Let’s try it. The testing head is a little cautious. You are mildly irritated with her and assign the developer to do a Proof of Concept. The first trivial demo goes through. The enthusiastic developer blogs about it. He then goes on to do the POC. He needs to demo it in 2 weeks.

Demo day. You see your application run automatically through a flow on Firefox. You are impressed and happy. Now your developer takes you through the code behind it. You see code. Lots of it. In Java. And cryptic long strings as identifiers. Lots of code with JavaScript expressions as strings. This seems complicated. You worry now. Can your testers do this? You ask if it runs on Internet Explorer 9 where your customers are. The developer says the tests seem to freeze up and crash and he suspects some bug in his code which he will fix. The testers want to try their hand. Install Eclipse he says. They have never used an IDE. They are excited with the new toys. The developer is surprised they don’t know Java and are staring at him blankly when he asks them to write a TestNG test. He explains and a few testers nod. He goes on to identify elements using the developer toolbar and does some copy pasting of xpaths etc. XPath? What is that asks the tester. He explains, but is starting to get frustrated. They seem to know nothing he thinks. “Can’t we use a recorder to build our tests?” asks a tester. Since the product does not have a recorder, the developer goes on to justify it that recorders are bad and you should always code. You sense that it is a cover up for a deficiency, but wait to watch how this plays out. Especially since you like the developer and don’t want to bruise his ego (little sensing how much you will regret this later). You allow the game to be played for a couple of more weeks. You think this may help the testers also scale up some skills.

A couple of weeks later, you talk to the team. The testers say they have not been able to automate much. The developer says they do not have the skillsets. You should hire automation engineers. You try out with two automation engineers. They don’t come cheap. They seem to love XPaths and adding waits and digging deep into browser developer tools. But one of them seems to not understand the business functionality. He even has a holier than thou attitude, as if testers who understand business, but cannot automate like him, are beneath him. The other one thankfully is saner. Both diligently dive in to create a “framework”. Your existing testers are getting demotivated. They fear they may be fired. You are getting frustrated too. You think maybe you should outsource this. You talk to a few vendors. They say they know the tool but you will need a framework. The framework will cost you thousands of dollars and a few months of effort. Automation can only start after that. You start budgeting for it. But you are worried. What will I do with my current testers? This all seems unnecessarily complicated. You sense that YOU ARE SOLVING TECHNICAL AND PEOPLE PROBLEMS INTRODUCED BY A TOOL RATHER THAN YOUR OWN BUSINESS PROBLEMS.

Thankfully, you talk to your friend who heads engineering in that clinical research company in the US. He tells you about another tool. A tool which has enabled his existing testers to automate. A tool which does not need XPaths or waits. A tool which has a good recorder. A tool which has inbuilt technology to ease every bottleneck you yourself have encountered so far. And a tool which works reliably across browsers. Fast. Even on Internet Explorer, which you have not been able to reliably run on yet with tool B. (Tool B’s fan boys kept blaming that IE is cr*p and is slow). And he raves about the support team which has bailed him out every time. They even shipped an entire new build in 3 days for one of his issues.


So you change track. You ask your tester to evaluate this tool. It is called Sahi Pro. She schedules a demo from the Sahi team. She asks lots of questions. She does a screen sharing of her application and the Sahi team demonstrates how to automate it. She finds it easy. She does not know yet about running it in suites, distributing it across machines, taking screenshots, integrating with Continuous Integration systems etc. But she need not worry. Everything is inbuilt into Sahi Pro. The developer went through Sahi Pro’s documentation and found that it covers all of this. And your friend said it works too.



You are happy. You are happier to know its cost. And the fact that it allows flexible licensing. It all makes perfect business sense. Your developer who was handling automation is back to development. He was frustrated with the brittleness of the tests and having to interact with non-programmers. He is happy to go back to doing fun creative coding. His first love. The testers have automated a lot of scenarios now, especially with Sahi Pro’s inbuilt framework. One of the automation engineers who was hired is a little disappointed that he did not get to develop his own framework. He has applied for developer jobs elsewhere. The other automation tester has gone back to do what he loves – exploratory testing of complex business scenarios, while his automated tests verify known paths and regression scenarios reliably…

OpenSSL and Heartbleed clarification in Sahi Pro

Posted by | Sahi, technical | No Comments

One of our support requests asked about the version of openssl used in Sahi Pro. Since it may be of concern to others, here is some more information related to use of openssl in Sahi Pro.

The version of openssl is :
OpenSSL 0.9.8h 28 May 2008

OpenSSL 0.9.8h did not have the heartbleed bug. (“OpenSSL 0.9.8 branch is NOT vulnerable” from
In Sahi, Openssl is only used to generate a signed certificate with Sahi’s CA certificate (also created via openssl).
All other HTTPS communication between browser proxy and server are done via Java’s built-in SSL implementation.
Sahi does not add its version of openssl into the system path, so it should not affect the rest of your system/application.

Sahi Pro v5.1.1 fast execution without waits on Chrome 34

Posted by | Sahi, technical | No Comments

Some of you may have noticed that Sahi Pro does not wait correctly for page loads since Chrome 34. This happens because of a change in window.document.readyState behaviour in (since?) Chrome 34.

To fix it, do the following:

Open sahi/userdata/config/user_extensions.js and add

// Chrome 33 fix start
Sahi.prototype.replace33 = function(fn) {return "("+(""+fn).replace("_isChrome", "isChrome33Minus")+")";}
Sahi.prototype.areWindowsLoaded = eval(_sahi.replace33(Sahi.prototype.areWindowsLoaded)); = eval(_sahi.replace33(;
Sahi.prototype.getChromeVersion = function() {
var m = window.navigator.appVersion.match(/Chrome\/(\d+)\./);
return m ? parseInt(m[1], 10) : 0;
Sahi.prototype.isChrome33 = function() {return this._isChrome() && this.getChromeVersion() == 33;}
Sahi.prototype.isChrome33Minus = function() {return this._isChrome() && this.getChromeVersion() <= 33;}
//Chrome 33 fix end

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

Restart Sahi, clear browser cache and check if it works. If you have trouble, please email support.

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

Testing responsive web design

Posted by | features | No Comments

Understanding responsive web design

When web content was primarily consumed through laptops and desktops, web sites were designed, developed and tested for handful of screen resolutions such as 800×600, 1024×768.

With advent of mobile operating systems such as iOS, Android, Windows 8 and BlackBerry 10, device manufacturers are rolling out different models of smart phones and tablets. Web content is being increasingly consumed using these smart phones and tablets. Screen size of these smart phones and tablets not only varies from one device model to other but also from one device manufacturer to another. Varying screen sizes among smart phones and tablets, create challenge for web designers, developers and testers.

Responsive web design is a user interface technique used by designers and front end developers to create adaptive web pages. These adaptive web pages will automatically change their design and layout to fit across different screen sizes (often of different devices).

Example of responsive web design

In this example we will look at a web page created using responsive web design technique. Below images show different view of same webpage across different screen size.

Webpage on Tablet Webpage on Mobile

What to test?

In responsive web design, when screen size changes, there will be an impact on following elements,

  1. Page Layout
  2. Visibility of elements
  3. Position of visible elements
  4. Size, color of visible elements

By asserting on visibility, css properties and position of elements, we could validate design and functionalities of a web page, across different screen size.

How to test?

  1. Resizing browser window
    • Load web page in a browser and resize the browser window to prefered screen size. Manually resizing browser window to specific size would be difficult and error-prone. We could use “” javascript api to set window size & load the web page.
  2. Using firefox developer tools
    • Go to “Tools” > “Web developer” > “Responsive Design View”, set prefered screen size and load the web page.
  3. Device emulators/simulators.
    • Android & iOS development environment comes with device emulators/simulators. Android emulator allows us to set device resolution. Web pages can be loaded and tested on these emulators/simulators.
  4. Actual devices.

Automtaion using Sahi

Sahi pro has many capabilities that will make testing of responsive web design across different screen sizes & devices, easy & elegant. Register below for free webinar (April 2013) on testing responsive web design using Sahi pro.

This webinar has expired

Sahi Pro v 4.5.2 – What’s New?

Posted by | features, releases | No Comments

This is a bug fix release

* Features
Added ability to pass extra parameters to Web based Script Runner
* Bugfixes
Fixed memory leak in distributed playback
Fixed problem with session timeout causing “Script did not complete in 150 seconds” error if page does not load within 90 seconds

Sahi Pro v 4.5.1 – What’s New?

Posted by | features, releases | No Comments

Sahi Pro V4.5.1 released.

This is a bug fix release. Please use this version instead of Sahi Pro V4.5


  • Added ability to pass extra parameters to Web based Script Runner

Bug Fixes

  • Fixed memory leak in distributed playback
  • Fixed problem with session timeout causing “Script did not complete in 150 seconds” error if page does not load within 90 seconds
  • Fixed parsing related bug which caused incompatibility with older Sahi scripts

Sahi Pro v 4.5 – What’s New?

Posted by | features, releases | 2 Comments

Sahi Pro V4.5 released.


  • _maskLogs and _unmaskLogs added to mask sensitive information in logs. More details
  • _addToSession added: Allows adding different domains to a session
  • Added up down arrows to move to parentNode in Controller.
    Parent Finder
    Clicking on the Up arrow identifies the current accessor’s parent element. Clicking the down arrow brings you back.

  • Added threads field in web based script runner.

  • Added ability to copy screen shot images into output logs folder
  • Testcase based reporting enhanced. Pass/fail counts display according to testcases. Navigation improved.
  • Evaluate Expression in flex shows more details.
  • Added logging for miscellaneous functions like _focusWindow(), _takeScreenShot etc.
  • _setFile2 added. Automatically handles js validations.
  • Fixed Java APIs
  • Selenium Java API Support (beta) added.
  • Applet Support (beta) added via _applet API More details
  • Rerouter added for dynamic domain to IP mapping

Bug Fixes

  • Fixed keypress issues in various browsers. This fixes keypress enter _keyPress(el, [13,13]) not working on some browsers.
  • Test case reports show count of testcases instead of scripts.
  • Mixing file and url scripts fixed.
  • Modal from different domain fix.
  • Double commas in SFL metadata fixed.
  • Limiting controller logs length to 100 steps to fix hang issues.
  • Fixed image path of screenshots in logs for Mac
  • handle newlines and spaces in browser_types.xml
  • Flex issues fixed. Horizontal Scroll Bar, NumericStepper, MenubarItem(only using number)
  • browser_types.xml Remove duplicate (x86) from browser path. Also expand $sahiDir.
  • Fixes _takeScreenShot on mac issue.
  • Added _setFile with 3 parameters in Sahi Java.
  • NO_LOG type handled

Sahi Pro v 4.3.2 – What’s New?

Posted by | releases | One Comment

Expand Collapse State in Logs Remembered

When moving from a script log to the script line and back, the state of expand or collapse of logs is remembered.

Controller State Remembered

The state of the Controller is remembered across sessions and even after a Sahi restart. This helps reduce a lot of time spent in setting and resetting the Controller parameters. The last URL entered in the Sahi initial screen is also saved.

New APIs Added


_closeBrowser() and _openBrowser() are used to close the browser in the middle of a script and then reopen it later. This can be useful where an application does not allow relogin unless the browser is restarted.


Sahi waits for AJAX readyStates 1,2 and 3. Some applications may have an AJAX request open at state 1 for long periods of time. Sahi should be asked to ignore readyState 1. _setXHRReadyStatesToWaitFor(“2,3”) can be called in this case. $waitStates is just a string of comma separated readyStates (“1,2,3” or “2” or “2,3” etc.).

Store Reports into MySQL Database

Sahi’s reports are stored in a file system based H2 database. For custom reporting it may be necessary to store it into a central MySQL database or another database. Sahi now supports storing reports into a MySQL database. More details Storing Reports in MySQL Database

Upgrade or Downgrade from inside Sahi Pro

To upgrade to a newer version, we have so far had to install Sahi Pro in a different folder and copy over the userdata directory. Now it is possible to directly upgrade from Sahi Pro itself. This will enable faster patch releases for critical bugs and easier maintenance of Sahi Pro.


  • Fixed bug in reporting large log files
  • Fixed _byText
  • Fixed bug in resizing Evaluate Expression box
  • Fixed IE focus issue
  • Fixed upgrade version comparison bug

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

Sahi Pro v 4.3 – What’s New?

Posted by | releases | No Comments

New APIs

Brings the browser window into focus. This is useful while taking screenshots or using native events.
Takes a screenshot of the entire screen and adds it to the logs.

Automatically rerun failed scripts

Sahi can create a suite of failed scripts and trigger it at the end of a suite run.
Refer to “Rerunning failed scripts automatically” section here

Trigger testcases from a web interface

We have released the first version of the web based interface for running Sahi scripts.
The web based testrunner allows us to easily trigger testcases on a remote machine running Sahi.

More details here: Web based Testrunner

Syntax highlighting on Evaluate Expression box and Script Editor

Syntax highlighting helps easily see script errors and match brackets in the Evaluate Expression box and Script Editor.

Encode proxy passwords in

Since proxy passwords can be sensitive, we have enabled simple base64 encoding for masking passwords in


You can base64 encode strings here: /demo/php/base64.php

Added missing mx and spark components in Sahi Flex Library

We added support for missing classes from the mx and spark packages

Show custom fields in suite reports

Look at Custom Fields section in Sahi Pro Reporting

Use Properties files when connecting to database

Sometimes it is necessary to pass more than just username password when making a connection to a database.
The _getDB API now can take a Properties file with extra parameters. More details: _getDB

Been a long year!

Posted by | Sahi, tyto | 2 Comments

2011 has been awesome for us. Tyto Software has grown and become a self sustaining unit with a team that has really come together. Sahi Pro is well received and we released V4.0 recently. We also added a lot of new customers; customers, who have expressed happiness at how our product works and how we support them. We added Flex capability, load testing, better reporting etc. to Sahi Pro, and the results have been very positive. A surprising hit feature was our Excel Framework, which saves a lot of time for users not very comfortable with programming.

While our support is generally well appreciated, we have been trying our best to keep improving on it. One sore point has been our lack of online payment processing methods, which we are trying to alleviate in January 2012.

Over all, we are geared well for 2012, having brought on a couple more to the team and put in processes which make the end user benefit a lot from using our product.

So where is Sahi Open Source? We have been very busy with the Pro version and we should be able to get a breather in January to port back fixes into Sahi OS.

Thank you all for your patronage, and wish you a very happy and prosperous New Year!

Sahi V3.5 2011-03-14 released

Posted by | releases, Sahi | No Comments

Sahi V3.5 2011-03-14 is now available on SourceForge.

  1. We have added support for HTML5 elements, so, for example,

    is identified by Sahi as:

  2. Proxy switching on IE has become a little better
  3. _collect and _count have been added.


    [code]_assertEqual(5, _count(“_link”, “View Details”));[/code]


    [code]var $els = _collect(“_link”, “/View/”);
    var $len = $els.length;
    _assertEqual(5, $len);
    _assertEqual(“View Details”, _getText($els[0]));
  4. Ignorable ids made a user modifiable property in So if you have a new framework which generates ids in a definite pattern, you can ask Sahi to not use them as identifiers for accessors.

    Look at recorder.ignorable_ids.pattern in

  5. Checkbox simulation has fluctuated a bit in the last few builds of
    Chrome. Sahi now assumes Chrome 10+ as default. This is modifiable in


    Change to false if the checkboxes seem to toggle back to original state.

  6. Download the latest version from here: and do spread the good word. You can tweet about it, or like us on Facebook or write a blog post about it.

    Wish you happy productive testing!

Stable accessors/locators using UI Relations

Posted by | Sahi, stable tests, ui relations, web automation, web testing, xpath | No Comments

Identification of elements in a web interface is one of the toughest challenges of software UI automation. First came accessing by location (x,y coordinates), which quickly faded away due to window resolutions, rendering differences etc. Then came the concept of identification using code structure. XPath became hugely popular;

Reasons being

  1. Automation was only attempted by established developers and they understood XPaths
  2. 5 years back web applications were simple enough to easily look at the DOM and identify XPaths.
  3. Some (silly!) tools adopted and hugely promoted XPaths for want of innovation on that front.

But XPaths quickly became notorious for being unmaintainable and difficult to understand. If test automation was to spread to non-programmer testers, this would be a huge barrier. Tools then tried to move on to css-selectors, which is still complex for the target test automation teams.

So what could be a possible solution? The answer is in the User Interface.

What is often forgotten in the software industry, is that applications are built to satisfy business needs. So whatever the id, XPath or css-selector is, a textbox meant for “loan amount” will always be near some label saying “Loan Amount”. An expand or collapse icon in a tree gets its meaning from the attached “User name” label for that node. These business requirements do not change as often as code or underlying HTML structure. An HTML table may get converted to an ext-js grid with scrollbars, but the cost will still be associated (and aligned) with a product and listed under the heading “Cost”. Items related to each other would be shown inside a box with an appropriate heading.

How can we use this information to identify elements? Use UI relations for identification. Sahi, which has been a pioneer in web-automation innovation, handles it as below:

A textbox meant for “loan amount” becomes

_textbox(0, _near(_label("Loan Amount")))


browser.textbox(0).near(browser.label("Loan Amount"))

The cost becomes
_cell(0, _near(_div("My product one")), _under(_div("Cost")))
The expand collapse icon becomes
_image("/tree-node-icon/", _near(_span("Expand me")))

  1. These accessors clearly communicate what the intention of the accessor is, in a straight forward way (within the constraints of programming language constructs).
  2. These also take away the complexity in identifying and stabilizing XPaths, or understanding complex css-selectors, or writing custom javascript loops to accomplish the same thing.
  3. They are quite stable. _near allows for more elements to come between two related elements, _under is spatially aligned. So you can move different elements around on the UI and still have your scripts working properly.

UI Relations are guaranteed to exist in any business application, irrespective of whether you have ids or not.

One argument that comes up is, what if there are two similar elements which satisfy the same condition. While it is still possible to index the similar accessors and uniquely identify them, it seldom happens in a real world application. If you have two textboxes near “Loan amount”, it is going to confuse your end user. User-interfaces do not generally have such anomalies. That said, an added index to the accessor handles that scenario too, if it arises.

There is one other simplification that Sahi does in its accessor APIs. It does not explicitly state what the identifying property is. For example what could have been
is simply given as
_textbox("username") in Sahi.

Why? Because there are very few cases where one textbox has name=”username” and another has id=”username”. Such naming would obviously confuse the web developer forcing him to not do something like this.

Combined with UI relations, Sahi also takes care of automatically waiting for AJAX requests and page loads. This makes for robust scripts which hardly have unexpected failures. Other features like parallel playback of suites, automatic report generation, ant integration etc. make Sahi one of the most advanced web testing tools in the industry.

If you have not tried it yet, download from now. You can also use Sahi from inside ThoughtWorks Studios Twist or PushToTest’s TestMaker 6.

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.

September Update

Posted by | Sahi, tyto, update | No Comments

The past month has been very special for us. We delivered Sahi Pro to our customers, and without even publishing about it, we got many inquiries about Sahi Pro. This was something we had not expected, but would like more of.

Given the number of support queries coming in, we had to scale to better serve our customers. So Boopathi M joins our team as a support engineer. With a background in programming and teaching mathematics online, we look forward to utilizing his tutoring capabilities to solve technical issues in Sahi for our customers.

We also managed to have a presence in Java One, thanks to PushToTest‘s generous offer to all its partners to show case themselves. Given that Sahi has started playing a good role in TestMaker’s web automation part, this turned out to be a good point of synergy.

I (Narayan) also participated as one of the panelists in the Birds Of a Feather session on open source testing tools, thanks again to Frank, CEO of PushToTest. (It is amazing what PushToTest is doing to promote open source products. If ThoughtWorks is the breeding ground for open source projects, I would say PushToTest is one of the few companies that helps them bootstrap and become commercially viable.) We realized Sahi is almost unheard of in the Java developer community! So we are coming up with ways to rectify that. If you have suggestions, do let us know.

This month was also great because we got lots and lots of praise for Sahi (read some testimonials). We had 4 instances of Sahi users reporting that they shifted from QTP to Sahi because QTP had problems identifying some web elements, which Sahi could easily identify. Some of them also had problems on QTP’s Windows 7 support.

Selenium continues to annoy us with its presence. We again had 3 different discussions with users who said “We find Sahi to be much easier to use but developers/management (in the US) have heard only of Selenium.” A stackoverflow question has considerably undermined Sahi’s capabilities and slandered DP, one of Sahi’s old and staunch supporters. It was frustrating to know we can’t do much about it. Equally unhelpful is the fact that we will not be able to participate in GTAC 2010 because “the committee reviewed each application with special attention towards contributions to the professional community, among other aspects. We regret to inform you that you have not been short-listed to attend this year’s conference.” We would have loved some discussion with the WebDriver guys.

Our website was hacked twice last month and if you find google search results showing weird titles for Sahi searches, please let us know on the forums or email us.

We have started a facebook page for Sahi, so please do spread the word.

We now have integrations with Test Management tools like XQual, Testuff and Neuvosoft Test Manager, and we will continue to support more. Coming up is integration with QMetry

Things on the roadmap (Oct-Nov):
1) Flex/Flash support(Pro)
2) Simple loadtesting through HTMLUnit (Pro)
3) Integration APIs for Test Management tools (Open and Pro)

We continue with our integrations with PushToTest‘s TestMaker and Test Object Designer, and with ThoughtWorks Studios’ Twist.

We will be starting webinars every two weeks as an introduction to Sahi. The first session is (tentatively) scheduled for 22 October 2010. If interested please email us at

Thanks for reading through. If you have suggestions, queries or advice, please email us at feedback(at) Hope to see you next month!

Sahi V3 2010-06-10 released

Posted by | releases, Sahi | 5 Comments

Sahi V3 (2010-06-10) is now available for download.

There have been significant improvements and bug fixes in this release.

  • API _under ( /w/browser-accessor-apis ) has been added to locate elements physically under another.
  • API _byXPath has been added to help users from Selenium and other tools move to Sahi.
  • API _row and _option have been modified to be in sync with other APIs. Existing scripts may need to be modified if you use these APIs.

Below is the changelog:

10 Jun 2010

* Bugfixes
Fixed data truncation bug introduced in 30 Apr build
Fixed getText bug which returned ab on FF and a b on IE for a
Fixed for   in select option text
Fixed window.opener behaviour for link clicks
Fixed parsing error for $a == $b

* Features added
Added Shiretoko as variant of Firefox
_byXPath added.
For browsers without XPath support,
download the javascript file from
and save the contents in sahi/htdocs/spr /javascript-xpath.js
_under added as a positional relation
Lets identify elements under another element eg. _cell(0, _under(_tableHeader("Status")))
5xx errors are displayed on screen too.
Time taken by each test is displayed in logs.
XHR redirects are excluded from injection
Added Driver.setControllerMode. Takes sahi, java, ruby
_option brought in sync with other APIs.
NOTE: older _option(selElement, value) will not work any more
Replace with _option(value, _in(selElement))
_row brought in sync with other APIs.
NOTE: older _row(tablElement, rowNumber) will not work any more
Replace with _row(rowNumber, _in(tablElement))
Use fully-loaded Sahi Pro FREE for a month. Download Now Request a Demo