Divya
Joined: 14 Sep 2009 Posts: 57
|
Posted: Thu Dec 03, 2009 9:53 am Post subject: Difference between Watir and Firewatir. |
|
|
------------Difference between Watir and Firewatir. ----------------------
Watir: Watir is pronounced as "water", is an open-source (BSD) library for automating web browsers. It allows you to write tests that are easy to read and maintain. It is simple and flexible.
Firewatir: It is a web application testing tool written using Ruby language. It is used for testing web application functionality on Firefox browser. It is written keeping 'Watir' in mind so that scripts written for testing the application on IE using Watir can be used with minimal/no changes, to test the application on Firefox.
How Firewatir different from Watir?
The main difference between Watir and FireWatir lies in the mechanism, which drives the browser, to test a web application.
Watir uses the COM object of IE browser exposed by windows. It interacts with the COM objects for doing any action on HTML elements, of a page, that is displayed using IE(i.e. HTML elements that are supported by Watir). Interacting with the browser in this way restricts the usage of Watir on Windows only.
For Firefox there is no COM object that is exposed. So, tried using XPCOM to interact with the browser. But it didn't work out as you need to compile XPCOM with Firefox browser. So it was not feasible for every user of FireWatir to first compile the source and then use the tool. So, explored more and found an extension called JSSh. JSSh is a TCP/IP JavaScript Shell Server for Mozilla that allows other programs like Telnet to make connections to the running Mozilla process. This was what we needed to drive the Firefox browser. The ruby calls are converted to corresponding JavaScript code and send to JSSh via a socket. JSSh executes that JavaScript code on the browser and returns the result.
So, finally the test scripts when executed on IE or FireFox will be executed in same manner; the working is transparent to users. Though, FireWatir is implemented using socket for interaction with the browser, there is not much of a difference in execution speed of FireWatir as comparted to Watir.
Thank You,
Divya. |
|