Tutorial Archives - Sahi Pro

Run Sahi script on iPad

Posted by | Support, Tutorial | 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…

Read More

Stable accessors/locators using UI Relations

Posted by | Support, Tutorial | 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…

Read More

Ruby Sahi with Cucumber

Posted by | Support, Tutorial | 8 Comments

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…

Read More

ZK testing with Sahi

Posted by | Support, Tutorial | No Comments

Joseph Neuhaus has written a detailed article on testing ZK applications with Sahi. The article explains how to run Sahi tests headless on a linux machine. Excerpts from the well written, thorough article: If you have attempted to create browser-based functional tests with Selenium, or load tests using Grinder, then…

Read More

Web automation does not need XPaths

Posted by | Support, Tutorial | 3 Comments

Really. Learn this web automation nursery rhyme today! XPaths are evil,XPaths are fickle,Developers touch code,And the testers are in a pickle! Have you ever used XPaths and found that it needs non-trivial amount of effort in maintenance? Especially testers, who do not have the time or energy to get XPaths…

Read More

Parsing XML in Sahi scripts

Posted by | Support, Tutorial | 2 Comments

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…

Read More

Configuring Eclipse for Sahi

Posted by | Support, Tutorial | No Comments

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…

Read More

Flash testing

Posted by | Support, Tutorial | One Comment

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…

Read More

Ajax and Sahi

Posted by | Support, Tutorial | One Comment

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…

Read More

Toggling Proxy on Browsers

Posted by | Support, Tutorial | One Comment

One of the pain points of using Sahi is to remember to set the proxy on the browser while testing and removing it later. There are a few tools which alleviate this well. Firefox: Use Proxy Button to toggle the proxy in one click from the Firefox toolbar. Internet Explorer:…

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