A Flash tutorial has been added to the Sahi home page.
It can be accessed at http://sahi.sourceforge.net/sahi_tutorial.html
If you like it, spread the word.
Friday, May 19, 2006
Monday, May 15, 2006
Sahi Nightly Build 2006-05-15 released
Release 2006-05-15 is a very enhanced release.
It contains the following fixes:
SSL certificates for proxy are generated automatically and on demand using keytool.
This fixes the security alerts problem.
Triggering keyboard events when value is set to textboxes.
Fixed bug which caused improper functioning in popups.
Fixed bug which caused null pointer exception when content type was not set.
Fixed bug where _table(index) was not working properly.
Fixed bug for multiple submit buttons on IE.
It contains the following fixes:
SSL certificates for proxy are generated automatically and on demand using keytool.
This fixes the security alerts problem.
Triggering keyboard events when value is set to textboxes.
Fixed bug which caused improper functioning in popups.
Fixed bug which caused null pointer exception when content type was not set.
Fixed bug where _table(index) was not working properly.
Fixed bug for multiple submit buttons on IE.
Labels:
Sahi
Thursday, May 11, 2006
Sahi ranked 55 out of 118720 projects
Current Sourceforge ranking of Sahi is 55.
Out of a total of 118720 projects.
Never dreamed of under 100.
Hope sourceforge does not say "we have a flaw in the statistics" ...
Out of a total of 118720 projects.
Never dreamed of under 100.
Hope sourceforge does not say "we have a flaw in the statistics" ...
Labels:
Sahi
Wednesday, May 10, 2006
Under 150
Sahi's sourceforge ranking is now 146.
Today's ego boost :)
http://sourceforge.net/project/stats/?group_id=151639&ugn=sahi
Today's ego boost :)
http://sourceforge.net/project/stats/?group_id=151639&ugn=sahi
Labels:
Sahi
Sahi - HTTPS support
Another 6 hrs of late night work yesterday
and I have almost all my https woes solved.
Even though Sahi could handle https before,
it was using a single certificate for all https websites,
causing browsers to report mismatch in the certificates.
With a mix and match of on demand generation of certificates using keytool,
and per website creation of certificates and some caching,
I have Sahi handling SSL so smoothly that
all I have to do is accept the certificates just once,
when I first visit a site and then totally forget about it.
If you have a https website to test, it is going to be a no brainer to automate it using Sahi. Await the next release. I shall post soon.
Now the only big issue left is web pages from multiple domains embedded into the frames of a frameset.
Of course there are a few bugs ... ;)
and I have almost all my https woes solved.
Even though Sahi could handle https before,
it was using a single certificate for all https websites,
causing browsers to report mismatch in the certificates.
With a mix and match of on demand generation of certificates using keytool,
and per website creation of certificates and some caching,
I have Sahi handling SSL so smoothly that
all I have to do is accept the certificates just once,
when I first visit a site and then totally forget about it.
If you have a https website to test, it is going to be a no brainer to automate it using Sahi. Await the next release. I shall post soon.
Now the only big issue left is web pages from multiple domains embedded into the frames of a frameset.
Of course there are a few bugs ... ;)
Labels:
Sahi
Monday, April 24, 2006
Sahi - Nightly Build 2006-04-24 released
This release of Sahi has the following changes:
The whole code base has been rewritten to be easily extendable.
Various optimizations have been made for speed.
This release includes a few important bugfixes related to cookies.
APIs
_dragDrop(elementToDrag, targetElementToDropOn)
and
_callServer("ServerClass_method") have been added.
Documentation has been given a face lift.
Check out http://sahi.sourceforge.net/ for the changed look and feel.
A mailing list sahi-users@lists.sourceforge.net has also been created.
The whole code base has been rewritten to be easily extendable.
Various optimizations have been made for speed.
This release includes a few important bugfixes related to cookies.
APIs
_dragDrop(elementToDrag, targetElementToDropOn)
and
_callServer("ServerClass_method") have been added.
Documentation has been given a face lift.
Check out http://sahi.sourceforge.net/ for the changed look and feel.
A mailing list sahi-users@lists.sourceforge.net has also been created.
Labels:
Sahi
Thursday, April 13, 2006
Sahi and Scriptaculous and lighttpd
Yogi's Stock Hive application and Scriptaculous demos had something very interesting in that they refused to work correctly when I used the Sahi proxy.
This was purely the proxying part and had nothing to do with javascript handling.
The problem apparently lay in the way cookies were being sent.
Cookie headers are sent to the server as
Cookie: cookie1=value1; cookie2=value2; cookie3=value3
While rebuilding cookies on the proxy, it was being sent as
Cookie: cookie1=value1; cookie2=value2; cookie3=value3;
The last semicolon after value3 was the root of the problem.
lighttpd seemed to think that the value of cookie3 was 'value3;' thus missing the session cookie.
The RFC seems to say that this behaviour is right, but most mainstream web servers seem not to mind this.
Crux is, Scriptaculous and Stock Hive both work now through the proxy. Now to get the AJAX and dhtml rich Scriptaculous to be scripted and played back.
This was purely the proxying part and had nothing to do with javascript handling.
The problem apparently lay in the way cookies were being sent.
Cookie headers are sent to the server as
Cookie: cookie1=value1; cookie2=value2; cookie3=value3
While rebuilding cookies on the proxy, it was being sent as
Cookie: cookie1=value1; cookie2=value2; cookie3=value3;
The last semicolon after value3 was the root of the problem.
lighttpd seemed to think that the value of cookie3 was 'value3;' thus missing the session cookie.
The RFC seems to say that this behaviour is right, but most mainstream web servers seem not to mind this.
Crux is, Scriptaculous and Stock Hive both work now through the proxy. Now to get the AJAX and dhtml rich Scriptaculous to be scripted and played back.
Labels:
Sahi
Wednesday, March 29, 2006
Testing SMTP settings
Came upon this link for testing SMTP server using telnet.
http://www.petri.co.il/test_smtp_service.htm.
Was very useful in verifying whether the settings are right before deploying our j2ee app on a remote server.
Also realized that the WebLogic domain needs a restart if settings in the JNDI Mail Session are changed.
http://www.petri.co.il/test_smtp_service.htm.
Was very useful in verifying whether the settings are right before deploying our j2ee app on a remote server.
Also realized that the WebLogic domain needs a restart if settings in the JNDI Mail Session are changed.
Labels:
programming
Tuesday, March 21, 2006
Sahi vs Selenium vs Watir
Updated thorough comparison of Sahi vs. Selenium
THIS IS A VERY OLD COMPARISON AND IS NOT TRUE ANYMORE Click here for the latest: Updated thorough comparison of Sahi vs. Selenium
A brief comparison. Please let me know if any information is incorrect.
Added Watir related data from Chris McMohan's comments:
Comments from Chris McMohan which I have incorporated into this comparison:
Actually, Watir has
a Firefox interface (version 1.0 just released, called "FireWatir")
a Recorder
methods intended for use at the command line like "show_links" so an object spy isn't necessary
Simultaneous playback (via Ruby threads)
Frames support (really excellent frames support)
Popup support native in version 1.5 (coming soon)
Ant support (not sure what you mean, but Ruby can be integrated with CruiseControl)
non-ascii character support (via Ruby)
Learning curve: Watir *is* a DSL for scripting the IE DOM. Ruby is just a bonus. :)
THIS IS A VERY OLD COMPARISON AND IS NOT TRUE ANYMORE
THIS IS A VERY OLD COMPARISON AND IS NOT TRUE ANYMORE Click here for the latest: Updated thorough comparison of Sahi vs. Selenium
A brief comparison. Please let me know if any information is incorrect.
Added Watir related data from Chris McMohan's comments:
Feature | Watir | Selenium | Sahi |
Browser based | yes | yes | yes |
Browser type independent (IE, Firefox etc) | IE & FireFox | yes | yes |
Scriptable/programmable (manageable/refactorable) | yes | not natively, but using ruby | yes (uses javascript) |
Recorder | yes | Only on Firefox. | yes |
Object spy | no | no | yes (hovering on any element,shows its accessor) |
Simultaneuos playback of multiple scripts(reduces playback time) | yes | no | yes |
Multiple domain support (go from google.com to thoughtworks.com) | yes | no | yes |
Frames and popup support | yes | has problems | yes |
Ant support (helps continuous integration) | yes | yes | yes |
Multi language (non-ascii character)support | yes | yes | |
HTTPS support | yes(Protocol independent) | yes | |
Learning curve | Learn Ruby | Recorder reduces the need to write code.TextPad Clip Libraries can be used too. | |
Language of scripting | Ruby - not native to the browser | Ruby - not native to the browser | Javascript - native to the browser andhence easily extendable. |
Web-app independent | yes | no - needs to be deployed with app | yes |
OS Independent | no | yes | yes |
Comments from Chris McMohan which I have incorporated into this comparison:
Actually, Watir has
a Firefox interface (version 1.0 just released, called "FireWatir")
a Recorder
methods intended for use at the command line like "show_links" so an object spy isn't necessary
Simultaneous playback (via Ruby threads)
Frames support (really excellent frames support)
Popup support native in version 1.5 (coming soon)
Ant support (not sure what you mean, but Ruby can be integrated with CruiseControl)
non-ascii character support (via Ruby)
Learning curve: Watir *is* a DSL for scripting the IE DOM. Ruby is just a bonus. :)
THIS IS A VERY OLD COMPARISON AND IS NOT TRUE ANYMORE
Labels:
Sahi
Monday, March 20, 2006
Sahi in London
"That was amazing!"
"That's the coolest thing I have seen!"
"If you haven't seen the demo, you should see it."
"Convincing customers to use this tool should be very very easy."
A few remarks from those who saw a demo of Sahi in the ThoughtWorks UK office.
I am grateful for the appreciation.
Just made another release of Sahi. Changes include automatic opening of Controller Window, and syntax highlighting files for TextPad.
Tech support emails have just started trickling in and it feels good to know someone else in this world is also finding this tool useful!
"That's the coolest thing I have seen!"
"If you haven't seen the demo, you should see it."
"Convincing customers to use this tool should be very very easy."
A few remarks from those who saw a demo of Sahi in the ThoughtWorks UK office.
I am grateful for the appreciation.
Just made another release of Sahi. Changes include automatic opening of Controller Window, and syntax highlighting files for TextPad.
Tech support emails have just started trickling in and it feels good to know someone else in this world is also finding this tool useful!
Labels:
Sahi
Sunday, February 12, 2006
Cookies and policies
Never knew IE6 and the newer browsers had security restrictions on cookies. Heard for the first time about "compact privacy policy" and "third-party cookies".
A few good links.
http://www.w3.org/TR/2001/NOTE-p3pdeployment-20010510
http://www.w3.org/P3P/
http://support.microsoft.com/kb/283185/EN-US/
A few good links.
http://www.w3.org/TR/2001/NOTE-p3pdeployment-20010510
http://www.w3.org/P3P/
http://support.microsoft.com/kb/283185/EN-US/
Labels:
browsers
Friday, February 03, 2006
Sahi vs ...
2 weeks of work and the newly released Sahi has a better controller GUI, better log reporting, and some bugfixes for multidomain support.
I have been asked many times as to why I am developing yet another web testing tool. My answer is that what we have so far really does not address complex web pages with frames, popups and frame breaking code.
As I realized on watching the progress of development on Selenium, it seems like people have started moving towards Ruby Selenium as it gives better control for the QA to organize code. The popularity of Selenium also seems to say that a visual indication for tests run is very much wanted. And of course the Selenium recorder has been really appreciated.
Combining all these concepts, but taking a totally different approach of injecting code into web pages (unintrusively as far as I know) which attaches handlers to elements, Sahi is able to do absolutely anything at all with the browser and the web page.
The Sahi script is essentially javascript, but is parsed on the Sahi proxy to achieve objectives like delayed execution.
A recorder makes the tool extremely useful as one can easily write mundane scripts, and then refactor it.
One place where it beats professional tools is in multithreaded playback and the way it does not require the test screens to be in focus, leaving you to carry on with your work, while it chugs (sails really) away in the background.
There are still quite a few bugs to be fixed and functionality to be added, but I think it is for grabs for people who wish to use a testing tool with almost all the features of a professional tool and more, but of course, want them absolutely free ;)
Putting Sahi on sourceforge has been one of my more satisfying moves, just for the fact that the daily statistics of the number of downloads really keeps my enthusiasm to add and rectify functionality to it. And of course it has made ego surfing more pleasureable!
I have been asked many times as to why I am developing yet another web testing tool. My answer is that what we have so far really does not address complex web pages with frames, popups and frame breaking code.
As I realized on watching the progress of development on Selenium, it seems like people have started moving towards Ruby Selenium as it gives better control for the QA to organize code. The popularity of Selenium also seems to say that a visual indication for tests run is very much wanted. And of course the Selenium recorder has been really appreciated.
Combining all these concepts, but taking a totally different approach of injecting code into web pages (unintrusively as far as I know) which attaches handlers to elements, Sahi is able to do absolutely anything at all with the browser and the web page.
The Sahi script is essentially javascript, but is parsed on the Sahi proxy to achieve objectives like delayed execution.
A recorder makes the tool extremely useful as one can easily write mundane scripts, and then refactor it.
One place where it beats professional tools is in multithreaded playback and the way it does not require the test screens to be in focus, leaving you to carry on with your work, while it chugs (sails really) away in the background.
There are still quite a few bugs to be fixed and functionality to be added, but I think it is for grabs for people who wish to use a testing tool with almost all the features of a professional tool and more, but of course, want them absolutely free ;)
Putting Sahi on sourceforge has been one of my more satisfying moves, just for the fact that the daily statistics of the number of downloads really keeps my enthusiasm to add and rectify functionality to it. And of course it has made ego surfing more pleasureable!
Labels:
Sahi
Tuesday, December 20, 2005
Random Fart
Q: Why is an empty String unethical or immoral?
A: Because it does not have any character! wah wah! wah wah!
A: Because it does not have any character! wah wah! wah wah!
Tuesday, December 13, 2005
Javascript sleep() or wait()
While thinking on a solution for handling javascript "alerts" in Sahi, it suddenly occured to me that a sleep() or wait() method can be implemented in javascript with the help of a synchronous XMLHttp request to the server.
It goes like:
The url http://localhost:9999/dyn/sleep?ms=1000 does a Thread.sleep(1000);
Of course there is the network delay which makes the time out slightly greater than 1000 ms;
[Dec 20 2007] NOTE: This method can give you a way to invoke a sleep on the browser, but it will also kind of freeze the browser which may not be what you want. I solved this problem in a different way for Sahi. (javascript-sleep-or-wait-in-sahi.html)
It goes like:
<script>
function sahiIsIE(){
var browser = navigator.appName;
return browser == "Microsoft Internet Explorer";
}
function sahiCreateRequestObject(){
var obj;
if(sahiIsIE()){
obj = new ActiveXObject("Microsoft.XMLHTTP");
}else{
obj = new XMLHttpRequest();
}
return obj;
}
function sahiSendToServer(url){
try{
var http = sahiCreateRequestObject();
var url = url;
http.open("GET", url, false);
http.send(null);
return http.responseText;
}catch(ex){throw ex;}
}
function sleep(ms){
sahiSendToServer("http://localhost:9999/dyn/sleep?ms="+ms);
}
var start = new Date();
sleep(1000);
alert((new Date()) - start);
</script>
The url http://localhost:9999/dyn/sleep?ms=1000 does a Thread.sleep(1000);
Of course there is the network delay which makes the time out slightly greater than 1000 ms;
[Dec 20 2007] NOTE: This method can give you a way to invoke a sleep on the browser, but it will also kind of freeze the browser which may not be what you want. I solved this problem in a different way for Sahi. (javascript-sleep-or-wait-in-sahi.html)
Labels:
browsers
Friday, December 09, 2005
Covered two-wheelers (with AC?) for Bangalore
While walking to office at 9 AM, I observed that out of 96 cars that I counted, 72 had just the driver in it! Of the 24 left, only 6 had more than 2 persons! Every Scorpio(6) and Innova(2) had only the driver in it!
Could covered two-wheelers (with AC?) do the job?
And Scorpios and Innovas should not start if the load is less than that of 3 passengers!
Could covered two-wheelers (with AC?) do the job?
And Scorpios and Innovas should not start if the load is less than that of 3 passengers!
Tuesday, December 06, 2005
Tiger Numbers
I was in Panna Tiger Reserve last week and came across something quite disturbing.
While the official figures for the number of tigers in the Park is around 35, locals and forest guides who track tigers say that only 6-7 have been sighted/presence ascertained in recent times. Liberal estimates place the number of tigers in the Park at around 15.
While I have no authority on reporting these numbers, one of the reasons for these figures not being reported from other directions, seems to be this:
* Forest officials are posted to a particular reserve for a fixed amount of time (3 years?). During this period, if they report any change in tiger numbers, they are liable to be questioned and pestered by the media and law enforcement officials. So even if an official inherits a reserve with lesser tigers than documented, he is not likely to report it.
* Researchers in the park depend on the forest officials for permits and for access to the forests. They cannot go against the forest officials by reporting this.
So that leaves nobody to actually report figures, which is disturbing.
The law and media somehow, convolutedly, seem to right now act as a deterrant in the conservation process. What tigers have gone, have gone. The need of the hour is to preserve what is left rather than punish those who have erred.
If there was some way of emancipating the forest officials once, so that figures are voluntarily disclosed truly (with the guarantee that no action will be taken against them), we may be able to get the correct numbers, and remedial measures can be undertaken with speed. Right now, the problem areas never come to light until past the time of debacle.
Additionally, researchers should not have to depend on forest officials for their permits. I think there is already something being done in this direction, though I do not have the details.
While the official figures for the number of tigers in the Park is around 35, locals and forest guides who track tigers say that only 6-7 have been sighted/presence ascertained in recent times. Liberal estimates place the number of tigers in the Park at around 15.
While I have no authority on reporting these numbers, one of the reasons for these figures not being reported from other directions, seems to be this:
* Forest officials are posted to a particular reserve for a fixed amount of time (3 years?). During this period, if they report any change in tiger numbers, they are liable to be questioned and pestered by the media and law enforcement officials. So even if an official inherits a reserve with lesser tigers than documented, he is not likely to report it.
* Researchers in the park depend on the forest officials for permits and for access to the forests. They cannot go against the forest officials by reporting this.
So that leaves nobody to actually report figures, which is disturbing.
The law and media somehow, convolutedly, seem to right now act as a deterrant in the conservation process. What tigers have gone, have gone. The need of the hour is to preserve what is left rather than punish those who have erred.
If there was some way of emancipating the forest officials once, so that figures are voluntarily disclosed truly (with the guarantee that no action will be taken against them), we may be able to get the correct numbers, and remedial measures can be undertaken with speed. Right now, the problem areas never come to light until past the time of debacle.
Additionally, researchers should not have to depend on forest officials for their permits. I think there is already something being done in this direction, though I do not have the details.
Labels:
wildlife
Monday, December 05, 2005
Sunday, November 20, 2005
Vacation
Am in Chennai, and wrote a lot of documentation for Sahi and uploaded them on the website. Excited about my travel plans to the jungles of Madhya Pradesh.
Thursday, November 10, 2005
Moth in a lampshade

A snap I had taken in Goa. This moth was sitting inside a light bulb reflector. This was taken with a Nokia 6610i camera!
Wednesday, November 09, 2005
Bird Watching
A slightly harsh chirp and a little movement like a small ghost in motion. Or maybe just a white ribbon with a black head, which has acquired a life of its own? A possessed ribbon, may be? Well, even as reason and experience tells me that what I see is the adult male Paradise Flycatcher, I can't rip my eyes off the bird. As I watch, it flits from its perch and makes a rounded flight, a twist here a turn there with its two long, white, tail feathers making undulating movements moving not very unlike the Olympic gymnasts and goes back to exactly where it started from. A chirp again.
Nearby is its female, an orangish brown bird, without the long tail feathers and with a black head. Quite unrelated to our gymnast for the uninitiated! But there goes nature in another of its bewildering and bewitching variations. A delight to the beholder but a beautiful moment gone unnoticed for the less visually adept.
Of all things that have caught my fascination, nothing has so far surpassed the joy that I derive from bird-watching. I had always been awed by birds, but not because of the cliched reasons of their flight or their colors or their songs.
It was as if I was just destined to love the avian fauna, no explicit reasons whatsoever. (The same extends to my love for animals too). The one reason I do sometimes think is true is their freedom and their so distinctly non-human behavior. Or maybe I am just curious about these creatures in an intellectual sort of way... I do not know and for the time being ascribe none of these reasons to my passion.
Initially, we used to look out for newer and as-yet-unseen-by-us species of birds and used to compete as to who has the bigger bird list. But now things are changed, it doesnot matter what bird it is. Be it the excitement of a fleeting glimpse of an Indian Pitta, or the tranquil movements of the bee eaters or the swallows, they instill me with a sense of appreciation for those things untouched by man. And I could just watch the fantail flycatchers and the ioras or hear the orioles and thrushes and waft away to sleep on the bank of some forest stream unconcerned about all else in the world! If only I did not have such a human mind, with its wants and greed! May be I will break away one day, but that day is not in the near future, as far as I can see!
Decided to record my bird sightings on the web by creating treepie.org.
Been using it on and off. Need to be more regular and may be get others to use it too.
Nearby is its female, an orangish brown bird, without the long tail feathers and with a black head. Quite unrelated to our gymnast for the uninitiated! But there goes nature in another of its bewildering and bewitching variations. A delight to the beholder but a beautiful moment gone unnoticed for the less visually adept.
Of all things that have caught my fascination, nothing has so far surpassed the joy that I derive from bird-watching. I had always been awed by birds, but not because of the cliched reasons of their flight or their colors or their songs.
It was as if I was just destined to love the avian fauna, no explicit reasons whatsoever. (The same extends to my love for animals too). The one reason I do sometimes think is true is their freedom and their so distinctly non-human behavior. Or maybe I am just curious about these creatures in an intellectual sort of way... I do not know and for the time being ascribe none of these reasons to my passion.
Initially, we used to look out for newer and as-yet-unseen-by-us species of birds and used to compete as to who has the bigger bird list. But now things are changed, it doesnot matter what bird it is. Be it the excitement of a fleeting glimpse of an Indian Pitta, or the tranquil movements of the bee eaters or the swallows, they instill me with a sense of appreciation for those things untouched by man. And I could just watch the fantail flycatchers and the ioras or hear the orioles and thrushes and waft away to sleep on the bank of some forest stream unconcerned about all else in the world! If only I did not have such a human mind, with its wants and greed! May be I will break away one day, but that day is not in the near future, as far as I can see!
Decided to record my bird sightings on the web by creating treepie.org.
Been using it on and off. Need to be more regular and may be get others to use it too.
Labels:
wildlife
Subscribe to:
Posts (Atom)