The Selenium IDE

barbie on 2007-01-30T10:50:32

So I now have a few scripts to help me create Selenium tests based on the configuration files and templates I have. These now create a large number of tests per web page, mainly for data input validation. However, before I wrote the scripts, I thought I'd start by using the Selenium IDE, which is a plugin for Firefox. It looks rather nice and has support for several formats. I selected Perl and started my browser session. Having gone through a couple of pages I went back to the plugin to discover that it's significantly flawed. It doesn't record any manually typed data that was entered into form fields. In the "documentation" (intro page) it claims it does, but saving the generated script and even rerunning it, fails to enter any data. I had to manually add the lines that add data. It did record clicks and verified selected text exists on the page though.

As a starting point it's not bad, but I can see how some could get rather annoyed with it, if they have to make lots of manual changes. Thankfully my scripts generate enough information that the manual invention is fairly straight forward, however they are very tailored to my requirements, and wouldn't be applicable to anyone else. The IDE also doesn't seem to be able to note cookie information, which is a shame as although my tests only need to check the cookie exists, I can see other sites, which make greater use of cookies, would benefit from having this available to them.

As the IDE is effectively still beta, I can forgive some of this missing functionality, as it's still usable. I like the fact it can automatically format test scripts into several languages, which is going to be a big bonus to making it popular with web developers. It might even help web designers think more about testing their designs. I'm now reading about how you can create your own extensions in 'user-extensions.js', which looks interesting. Not sure if I'll get to use it, as there is already much of what you need there already in the core app, but it's nice to see that they've thought about this feature.

In other news I spotted a bug in Test::WWW::Selenium. As I was testing cookies it made it fairly easy to spot. However, the more I read and learn about Selenium, the more I realise how desperately they need a good beginners guide :)