Frequently Asked Questions

Sahi has everything you wanted from a web automation testing tool + more!

Sahi Pro Frequently asked Questions

  • What is the problem we solve?

    Organizations which create or maintain web applications need to test a lot of functional flows before releasing a new version of the software. Typically a manual tester would sit and test the features before release and this can take up to a month of effort, and is prone to human error. When fixes are rolled out for bugs in this period, those functionalities need to be re-tested and verified, adding to the testers work load. Automating known work flows can easily bring down the testing from 1 month to a matter of days.

    Testing repeated steps is also a drudgery which can be alleviated by automation, allowing testers to focus more on creative exploratory testing.

    Specifically, in the web domain, there are a profusion of browsers (Internet Explorer, Firefox, Chrome, Safari, Opera etc.) which the end user may use to access the application. Browsers can differ from one another in the way they behave causing an application to work on one browser but not on another. Application developers need to test the application across browsers, thus multiplying the testing effort. Sahi Pro allows users to develop automation scripts which can test applications across browsers and report failures.

    Let us see how Sahi addresses common test automation problems:

    There are a lot of browsers and they need to be tested for functionality Sahi Pro works across browsers and Operating Systems. Scripts written for one browser will work on another browser without modification.

  • Web applications can be complex. Is it tough to get started?

    Sahi Pro’s Controller comes with a very good Recorder, which will help quickly come up with test cases. The recorder also helps identify elements on the browser and test Sahi commands instantly. The Sahi Pro Controller works on all browsers and Operating Systems.

  • Is it good to rely on Sahi Pro’s recorder?

    Record and playback is just a stepping stone. It lets users quickly come up with the first cut of their testcases. For maintainability one needs to restructure their code into reusable functions. Having said that, using the Recorder to identify elements, record actions and experiment with Sahi code can save tremendous amount of time. For a single step or for a few steps, a recorder is really useful. It auto generates the code that you need. You can then copy paste it into your reusable functions and parameterize it.

  • How does Sahi Pro handle Element Identification?

    Sahi uses the various DOM attributes of an element for identification. Sahi also has nice APIs like near, in, under etc. which lets us identify one element with respect to another. For example, a textbox near a label can be identified as _textbox(0, _near(_label("Username")))

  • How does Sahi Pro handle Element With Dynamic IDs?

    Sahi does not solely rely on ids for identification. It uses many other DOM properties, with emphasis on visible text. Sahi’s relational APIs like in, under, near etc. help identify one element with respect to another.

  • Why Sahi Pro does not use XPath for Identification?

    Using XPath leads to brittle, unmaintainable and slow tests. XPath is used to traverse XML structures which represent data. An HTML page is not data. It is a visual representation of data and is prone to modification. Further XPath is not natively available in browsers. One may need to use external libraries for it. Browsers also have differences in their implementation of XPath.

  • How does Sahi Pro work?

    When we start Sahi, a small proxy server is started on port 9999. When a browser is launched from the Sahi dashboard, the browser is configured to use Sahi’s proxy. This causes all request responses to go through Sahi’s proxy. When the response is returned to the browser by the proxy, it injects javascript code into it. This injected javascript code allows Sahi to control the browser.

  • If i already use Proxy, What should i do?

    You need to configure Sahi to use your proxy. So, browser uses Sahi Proxy, Sahi uses your proxy. Details: /w/configuring-an-external-proxy

  • What Applications will Sahi Pro Work on?

    Sahi will work on all web applications which render on browsers. Your web application may be using J2EE, .NET, PHP, Ruby on Rails, Python or any server side technology. As long as the output is accessible via the browser, Sahi can automate it. However browsers may render some content via plugins. For example, flex, applet, Silverlight etc. are some technologies which use browser plugins. Of these, flex and applets are automatable via Sahi.

  • Does Sahi Pro work with iframes, frames?

    Yes Sahi supports iframes and frames. In fact Sahi automatically loops through all frames and iframes, so you need not explicitly add any script for handling frames and iframes.

  • Does Sahi Pro Work with Modals and Popups?

    Yes Sahi supports all of these. (alerts, confirms, prompts, popup windows, modals launched from showModalDialogs)

  • Does Sahi Pro Work with HTTPS and SSL sites?

    Yes Sahi works easily with HTTPS and SSL sites.

  • What Scripting language does Sahi Pro use?

    Sahi uses Sahi Script as its default scripting language. Sahi Script is just an extension of Javascript and supports all the constructs of Javascript.

  • DDoes it support other languages?

    Sahi also has drivers in Java and Ruby. Note that the Java and Ruby drivers let you control the browser, but do not have any of Sahi’s features like automatic reports, distributed playback etc. You may need to write your own framework or use some else’s framework if you use the java or ruby driver. Sahi’s also has a PHP driver which is written and made available by folks from Symfony.

  • Does Sahi Pro handle 401 authentication dialouges?

    Yes, Sahi handles 401 authentication dialogs. It creates its own page with username and password fields, which can be automated like a normal HTML page.

  • What is the genreral usage path for teams using Sahi Pro?

    1) Record the first script and play back from the Sahi Controller

    2) Add a few more scripts and execute them from the Controller

    3) Modify slightly and make sure tests are repeatable.

    4) Experiment with Sahi Excel Framework and check if it is suitable for team

    5) Create a suite file, add the created scripts/excel files and run them from command line.

    6) Run from ant, integrate with continuous integration system like Jenkins

    7) Add more scripts, start version controlling the scripts itself and execute longer running test cases.

    8) Build time increases, so break into separate suites for smoke tests and complete tests.

    9) Distribute tests across machines to reduce playback time. Also configure auto retry.

  • What browsers or operating systems does Sahi Pro supports?

    Sahi uses a combination of proxy server and injected Javascript to drive a browser. Sahi’s proxy is written in Java. So any operating system which has Java support and any browser which has Javascript support will work. This essentially covers all modern browsers and operating systems.

  • Are there Commercial tools which uses Sahi Pro?

    ThoughtWorks Studios’ Twist and PushToTest’s TestMaker leverage Sahi for web automation.

  • Is Sahi Pro integrated with any test management tools?

    Sahi exposes all its functionality via REST APIs. Tools can easily integrate with it using these APIs. Please have a look at Sahi Integration and Callback functions.

  • Does Sahi Pro have drivers in other languages?

    Apart from Sahi Script, which is like Javascript, Sahi has drivers in Java, Ruby and PHP. The PHP driver has been entirely written by the kind folks at KnpLabs (the same guys who wrote Symfony)

  • What Scripting language does Sahi Pro use?

    Sahi uses Sahi Script as its default scripting language. Sahi Script is just an extension of Javascript and supports all the constructs of Javascript.

  • Does it support other languages?

    Sahi also has drivers in Java and Ruby. Note that the Java and Ruby drivers let you control the browser, but do not have any of Sahi’s features like automatic reports, distributed playback etc. You may need to write your own framework or use some else’s framework if you use the java or ruby driver. Sahi’s also has a PHP driver which is written and made available by folks from Symfony.

  • What are the support options?

    Community support is available via the forums. Commercial support is bundled with Sahi Pro. Please email support@Sahipro.com with your Sahi Pro queries.

Ready to give it a spin?

Sahi Pro is the automation tool your QA team dreams about. Register now and get 30 days free trial

Buy Now Try For Free