Fork me on GitHub

15 Jun 2010

Export Selenium IDE scripts for Grails

Thanks to the documentation provided on Adam Goucher's blog I've created a simple Firefox plugin that extends the Selenium IDE and adds formatters that allow you to export a script as a Grails Selenium RC test case. You have the option of JUnit 3 (extends GroovyTestCase, uses assertEquals) or JUnit 4 (doesn't extend anything, uses annotations and assertThat) formats.

I think everything is working. There are some things I'd still like to do:
  • Custom commands are currently exported as commented out which they don't need to be given Grails Selenium RC test cases can call Javascript extension functions directly.
  • I haven't yet figured out how to output a command such as
    rather than
    selenium.waitFor {

The Firefox plugin is available from Selenium HQ. You will need to have Selenium IDE installed for it to work, obviously. Once installed you should find options
  • Export Test Case As -> Grails Selenium RC (JUnit 3)
  • Export Test Case As -> Grails Selenium RC (JUnit 4)
have been added to Selenium IDE's File menu.

Whilst I would certainly not leave the exported test case as is it's a quick way to get started. From the exported script you can easily refactor out some page objects or helper methods.


Amirtha rao said...

Nice blog, here I had an opportunity to learn something new in my field. I have an expectation about your future post so please keep updates.
Selenium Course in Chennai|Best Selenium Training Institute in Chennai

iqbal12 Dlk said...

very nice and informative blog
mobile computing projects chennai

Bay Max said...

Thanks for sharing interview questions on software testing. Your post is very helpful for freshers and job seekers to excel in testing and do well in the job interview.
Software testing training institutes in chennai

Jones Sathya said...

Looking for best Software Testing Training in Chennai? CREDO SYSTEMZ is the No 1 Software Testing Training Institute in Chennai offering professional training on both Manual, automation testing training like Selenium, QTP/UFT and Performance Testing Training Courses like LoadRunner and JMeter. More Details: Software Testing Training course details.

shalu said...

Thanks a lot for explaining practically. Fantastic Post! Get more information Selenium Training in Chennai|Selenium Course in Chennai|Selenium Training

svr online Training said...

Thank's For Sharing....Salesforce Certification Training

techvelocity partners said...

Great post..Visit this for more information
Risk management consulting services
ROI consultant minnesota
consulting company minnesota

Inigo joseph said...

Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
rpa training in chennai