- Sahi is Web Automation Tool in which two kinds of tools available for use
Sahi OS: It is open source .
Sahi Pro : It is paid tool. http://sahi.co.in
- I am using Sahi Web Automation Tool. It’s a very good tool to use for Web Automation.
- Start with Sahi Open Source.
- Download latest version of JDK 32 bit. And install JDK on your machine.
- Remember 32 bit of JDK supports ODBC connection so you need to install 32 bit JDK.
- After Installing JDK set value in “path” environment variable also.
Note : To set path in environment variable please right click on Computer and click on Properties.
Go to Advance system Setting and click on Environment Variables and set path in “path” environment variable.
- Now download latest Sahi OS version ( http://sourceforge.net/projects/sahi/files ) and install Sahi.After Installing you will get folder of sahi on your drive where you have installed Sahi.
- Now you are ready to start with sahi.
- Click on Sahi shortcut created on desktop.
- By default, all browsers installed on your PC are shown. If not then click on Configure link
- Go to browser_types.xml, you will see that there is some configuration for browsers. Check whether path for installed directory of browsers is mentioned properly or not. If not, change the path and restart the sahi.
- To check Sahi is working on all browsers taking example of one browser i.e. Mozilla
- ALT + Double Click to open sahi controller you will get controller as shown below
- Now to identify object just press “Ctrl” key and over the mouse on any object you will get all the details of the objects in Accessor and Alternatives.
- For checking that sahi is working or not; press Ctrl and hover the mouse on textbox of name “Enter start URL:” and enter value as “Test” in “Value:” textbox of controller.
- Click on Set button on controller. You will see that Test is entered in textbox as shown in figure. If Test is entered then Sahi is working properly.
- Else you can check
- Firefox: http://sahi.co.in/forums/discussion/4779/firefox-20-0-giving-issues-to-anyone/p1
- Chrome (If controller not opening for Chrome browser): http://sahi.co.in/forums/discussion/4624/sahi-controller-doesnt-open-with-chrome-version-24-0-1312-52-m/p1
- Or just search on Google with your problem. I am sure; you will get many solutions from Sahi forums and Sahi blogs.
- As described above; check all browsers are working and controller is opening for each browser.
- Now you are ready to start with Sahi Web Automation Tool and Sahi Scripting.
- Before starting; Please go through http://sahi.co.in/w/using-sahi for better understanding of Sahi Web Automation Tool.
- Some sample format of how to write script please refer below scripts(Generalized)
- Action= name of operation you want to perform on objects.
- Object type= name of object type e.g. “textbox”,”button”,”link” etc
- Object name= name of object
- Value= Value if any.
- Position=near or under position( This is basically used when you are performing action on particular object with reference to another object)
- Nearobjecttype: Type of reference object
- Nearobjcetname= Name of reference object
- Underobjcettype– Type of reference object
- Underobjcetname– Name of reference object
- Please refer some generalize script which is helpful to understand “How to write ascript?”
- _action(_objecttype(“object name”),”value”);
- _action(_objecttype(“object name”));
- With the above script; you can check “How actual script is written?”
- _setValue(_password(0,_under(_span(“Please Login”))).”abcd1234”);
- Hope this will helpful for you to understand how script is written.
Hope, this Document will help to start with Sahi Web Automation tool .
For More Information Visit http://sahi.co.in and Thanks to Narayan and Tyto Software Pvt. Ltd team for making wonderful tool for Web Automation tool.
All the Best.