Quick Tip: Changing selenium driver versions for Geb + Grails

If you’re running into problems with the included version of the Selenium drivers included with the Geb plugin in Grails, you can set the following in your buildConfig.groovy file to change it.

test( "org.codehaus.geb:geb-core:0.4-SNAPSHOT"){
   excludes( "selenium-common", "selenium-remote-client", "selenium-remote-client" )

test 'org.seleniumhq.selenium:selenium-common:2.0a4'
test 'org.seleniumhq.selenium:selenium-remote-common:2.0a4'
test 'org.seleniumhq.selenium:selenium-remote-client:2.0a4'

test 'org.seleniumhq.selenium:selenium-firefox-driver:2.0a4'
test 'org.seleniumhq.selenium:selenium-chrome-driver:2.0a4'
test 'org.seleniumhq.selenium:selenium-ie-driver:2.0a4'
test('org.seleniumhq.selenium:selenium-htmlunit-driver:2.0a4') {
exclude 'xml-apis'

In our latest project, for example, we found that the firefox driver craps out like a Microsoft product had a few issues with javascript page redirections, reverting to the 2.0a4 revision of the selenium drivers helped us get past this hurdle.

Notice that we had to change the dependencies on the pulled in geb-core jar file, and not use the Grails plugin jar exclusion mechanism. Also be careful not to use :latest-release for all your drivers, as they will override the version of selenium-commons you use.

This took me a little while to figure out while staring blankly at the grails dependency reports, so I thought I would share it here.

3 thoughts on “Quick Tip: Changing selenium driver versions for Geb + Grails

  1. Pingback: Blog bookmarks 09/11/2010 « My Diigo bookmarks

  2. Ed

    The only one I’ve been able to get to work is firefox version 2.0a7.

    As for the geb, spock etc versions:





Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s