Parsing XML in Sahi scripts
Sahi uses Rhino as its JavaScript engine and Rhino has excellent support for handling XML. Below is a script which reads and asserts XML nodes and attributes. The example has been picked from http://www.ibm.com/developerworks/webservices/library/ws-ajax1/ so that it is easy to experiment with the IBM examples in this script .var xmlStr = ” +” +‘ […]
How to get started with Ruby Sahi and Cucumber
What is Cucumber? Cucumber lets software development teams describe how software should behave in plain text. The text is written in a business-readable domain-specific language and serves as documentation, automated tests and development-aid – all rolled into one format.- From http://cukes.info/ Follow the steps below to get started with Ruby Sahi and Cucumber. Install Java […]
Fetching multiple elements? _collect APIs to your rescue.
There are multiple cases in automation where you would like to fetch multiple elements. In such cases, you can use any of the three APIs – _collect, _collectAttributes and _collectElementsInfo.Let us see each API in detail._collect:This API returns an array of element stubs of all elements of type apiType matching the identifier within relations.Syntax:_collect($apiType, $identifier[, […]
Five Questions Series: Sahi Controller
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 […]
Five Questions Series: Sahi Excel Framework
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 […]
Five Questions Series: Sahi Logs
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 […]
Five Questions Series: Sahi Pro Licensing: User License vs Concurrent License
In the fifth post on the Five Questions Series, we have Sahi Pro Pricing and Licensing today.Previous posts in this series: Sahi Relational APIs, Sahi Controller, Sahi Logs and Sahi Excel Framework. What is the pricing model of Sahi Pro?There are two types of licenses for Sahi Pro – User License and Concurrent License.Global usage […]
Flash testing
The other day I came across a link explaining how to test flash applications using Selenium. Sahi already supports testing of Flash objects embedded in web applications out of the box, with no extra code.For any attribute or method that is exposed via ExternalInterface in the flash object, one can just do_call(_byId(“flash”))
How to Configure Eclipse for Sahi Pro

Eclipse’s JSDT plugin provides syntax highlighting and verification for Javascript. It can be configured to work well with Sahi scripts too. This video goes through the different steps to configure Eclipse to work with Sahi scripts.JSDT looks at all functions in the given source folder and can list them in content-assist. Taking advantage of this, […]
Ajax and Sahi

Problem In Sahi, some javascript is added to all pages. In an ajax call, the response should be xml. But sahi may taint the xml with its javascript and hence ajax calls may stop working. Sahi looks at the content type of a file before it injects its js, but most of the time the […]
