Firefox extension to easily automate all your browsing tasks
There is a
Firefox extension called Selenium IDE made by the folks over at OpenQA.org.
It is a very easy to use and powerful tool for controlling, automating
or testing web sites. If there is any repetitive or
predictable task that you are always doing in your browser why not let
the Selenium IDE handle it for you. It has a very easy record
and playback feature making it a breeze to automate anything you
want. It will even save your automated task in Ruby code
without needing to know a lick of Ruby. The Selenium IDE
makes this possible by intercepting browser actions such as clicking on
a link, entering some text in a field, submitting a form, etc. and then
performing those actions as if you were doing it with your keyboard or
mouse. Don't' get scared away, this is all really very easy,
and you don't need to know anything about computer programming to use
it (although it's a plus if you do). Let me show you how easy
it is. I'll show you how to make a script that will
automatically enter positive feedback for your last eBay auction.
Install Selenium IDE from here,
then restart your browser
to enable the new extension.
Select "Selenium IDE" from the Tools menu in Firefox. The
Selenium IDE will pop up which looks like this:

By default when the IDE comes up it has recording turned on.
You might want to turn it off by clicking on the red button, until you
are ready to begin recording. (There is a very subtle
difference in the appearance of the red icon in recording mode and
non-recording mode so pay close attention.)
Go to a web site that you want to record, click on the record button
and begin your browsing task(s). You will notice that as you
click and type in the browser the IDE is recording everything you are
doing. When you are done, simply end recording and click on
the green arrow to play back your script you just created.
Don't forget to save your script before closing the IDE.
To give you an example of a good Selenium script I'll show you one that
I created. The following script will automatically provide
feedback to your last eBay auction. You need to be logged
into your eBay account before running the script. You could
easily have your Selenium script log you into eBay as well.
Here is the script in Ruby code. I like to use the Ruby
setting because it makes the source for your script smaller and easier
to manage. (To change which format your source gets generated
in select Format from the Options pull down menu).
If you want to try this script out, simply go to the Source tab in the
IDE and paste the above script in there. Now go back to the
Editor tab and click on the Green arrow button. You should
now see the actions taking place in your Firefox browser. If
you want to slow down the execution select the Walk radio button before
playing the script. You may need to increase the pause
commands if the web pages are not rendering fast enough, and thus
causing an error.
That's all there is to it. If you would rather see how this
works before diving in, watch this movie that walks you through the
entire process start to finish. This video shows you how to
record a google search.
Video: showing how
to record and play back a google search.
Although they call it an "IDE" (Integrated Development Environment) you certainly can't compare it to something like MS Visual Studio or Eclipse. However it is much more than a simple record and playback tool. You can set breakpoints, It has a debug output window, you can step through your code, and you can set the start or entry point into the script. The one big thing that you might find yourself needing is some kind of flow control such as IF and WHILE commands. I have not done it yet, but it looks like you can add this functionality among others by going to their User-Extensions page.
