Selenium Test Scripts – To record or write?
June 22, 2008
So I’ve gotten the Selenium Core installed on a staging web server where we run development code. Additionally, I have installed the Selenium IDE Firefox extension to record test scripts. I have been recording a few test scripts on some very basic functionality of an application I have been working on, then uploaded the test suite to a testing directory within my application directory structure. Then it’s time to run the Selenium TestRunner and access my test suite. For some reason, I get small failures that while not indicative of a problem with my code, but rather idiosyncracies with Selenium or my JavaScript deficiencies. I’m getting very minor errors about elements not being found which I’m fairly sure is due to me not being in the habit of assigning an id attribute to everything especially form elements, so that Selenium can find them. I’m also wondering if it is better to manually write test scripts for Selenium, which sounds too time consuming, or is it OK to just use the Firefox extension to record them. I’ll do a bit more digging to see what I can find. Selenium is available at http://openqa.org.
Entry Filed under: Web Application Development. Tags: Firefox, Selenium IDE, Sotftware testing, web development.
1 Comment Add your own
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed

1.
Jason Huggins | June 23, 2008 at 4:27 pm
Hi, Kenneth.
Glad you’re finding Selenium useful (despite its idiosyncrasies). Unfortunately, there is no free lunch in software testing. Putting in a little bit more work to make your app more testable (like inserting those id tags that you mentioned), and not always relying on what Selenium IDE produces in its recorded script will make your tests less brittle.
Cheers,
Jason “Mr. Selenium” Huggins