首页 > Linux操作系统 > Linux操作系统 > Sahi Tutorial

Sahi Tutorial

原创 Linux操作系统 作者:AlexQin 时间:2011-05-04 16:17:23 0 删除 编辑


Sahi is an open source testing tool for web applications, with the facility to record and playback scripts. Developed in Javaâ„¢ and Javascript, this tool uses simple Javascript to execute events in the browser.


In-browser controls
Intelligent recorder
Text-based scripts
Ant support for playback of suites of tests
Multi-threaded playback from a command line
HTTP and HTTPS support
AJAX support

Sahi runs as a proxy server which intercepts traffic from the web browser and records the web browsing actions. Sahi can play back those recorded actions by injecting Javascript into the browser so it can access elements in the web page. This makes the tool independent of the website/ web application.

Sahi is similar to Selenium ( but is not browser specific like Selenium is.  Sahi works with Firefox, Internet Explorer, Opera, and Safari whereas Selenium is Firefox only. In addition, Selenium has to be deployed to the server the web application resides on. Sahi just needs a browser that can display the web application.

Sahi is released under the Apache License, Version 2.0.


Sahi requires Java 1.4 and above. You can get Java here.

Installing Sahi

You can download Sahi and the source code from here. The latest build (the one at the top of the list) is the one you want.

Unzip to a convenient directory of your choosing.
That's it!

Running Sahi

Navigate to the Sahi directory you extracted and:

Windows: Go to \bin and run sahi.bat
Linux and Mac: Go to /bin and run

The Sahi proxy server will start and begin listening for traffic on port 9999.

by default Sahi uses port 9999. This can be modified through in the \config directory.

Now that the Sahi proxy server is running, it's time to configure the web browser to use it.

来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

下一篇: Sahi - Screen Shots
请登录后发表评论 登录


  • 博文量
  • 访问量