Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6916199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:34:16+00:00 2026-05-27T09:34:16+00:00

I am trying to set up Selenium in my Grails project via the Selenium-RC

  • 0

I am trying to set up Selenium in my Grails project via the Selenium-RC plugin.
I have then run the grails install-plugin selenium-rc command.

Then, I have run the grails create-selenium-test firstTest command, and added the following content to it:

import grails.plugins.selenium.*
import org.junit.*
import static org.junit.Assert.*
import static org.hamcrest.Matchers.*

@Mixin(SeleniumAware)
class FirstTestTests {
    @Before void setUp() {
    }

    @After void tearDown() {
        super.tearDown()
    }

    @Test void something() {
        selenium.open "/"
        assertTrue selenium.isTextPresent("Bem vindos")
    }
}

When I run the test on Ubuntu 11.04, Grails starts the default firefox browser (version 8.0) but freezes here after printing this to the console output:

    Server running. Browse to http://localhost:8080/
  [groovyc] Compiling 1 source file to /home/alessandro/Documents/[...]/target/test-classes/selenium
Starting Selenium server on port 4444 ...
Starting Selenium session for http://www.mywebsite.com/ ...

When I interrupt the test via Ctrl + C, it throws the following error message:

    Error running selenium tests: java.lang.RuntimeException: Could not contact Selenium Server; have you started it on 'localhost:4444' ?
Read more at http://seleniumhq.org/projects/remote-control/not-started.html
Connection refused
java.lang.RuntimeException: Could not contact Selenium Server; have you started it on 'localhost:4444' ?
Read more at http://seleniumhq.org/projects/remote-control/not-started.html
Connection refused
    at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:86)
        at com.thoughtworks.selenium.Selenium$start$0.call(Unknown Source)
    at grails.plugins.selenium.SeleniumWrapper.start(SeleniumWrapper.groovy:90)
    at com.thoughtworks.selenium.Selenium$start.call(Unknown Source)
    at grails.plugins.selenium.SeleniumRunner.startSelenium(SeleniumRunner.groovy:35)
    at grails.plugins.selenium.SeleniumRunner$startSelenium.call(Unknown Source)
    at _Selenium_groovy$_run_closure2.doCall(_Selenium_groovy:50)
    at _Events$_run_closure3.doCall(_Events.groovy:32)
    at _GrailsEvents_groovy$_run_closure5.doCall(_GrailsEvents_groovy:58)
    at _GrailsEvents_groovy$_run_closure5.call(_GrailsEvents_groovy)
    at _GrailsTest_groovy$_run_closure4.doCall(_GrailsTest_groovy:265)
    at _GrailsTest_groovy$_run_closure4.call(_GrailsTest_groovy)
    at _GrailsTest_groovy$_run_closure2.doCall(_GrailsTest_groovy:228)
    at _GrailsTest_groovy$_run_closure1_closure21.doCall(_GrailsTest_groovy:187)
    at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:174)
    at TestApp$_run_closure1.doCall(TestApp.groovy:82)
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:427)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:415)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.executeTargets(Gant.groovy:590)
    at gant.Gant.executeTargets(Gant.groovy:589)

I have read the plugin doc, which says the server is started by the plugin, which is backed by the console output before the test freezes. I do not really know where to go from there.
I have browse the web but the only piece advice I have found was to add the selenium-server.jar to java path, which seems to be covered by the plugin already.

Any help greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:34:17+00:00Added an answer on May 27, 2026 at 9:34 am

    I had the same issue – you can see my question. the problem I guess is the firefox – I changed it to Chrome and it worked out of the box.
    You just need to replace

      browser = "*firefox"
    

    with

      browser = "*googlechrome" 
    

    in SeleniumConfig

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run selenium tests as part of build. I have a
i'm trying to set up the selenium-maven-plugin and having some difficulties i hope somebody
I'm trying to set up a Jenkins multi configuration job for the selenium tests
Trying to set it so if a certain condition is met then one of
Trying to set up a new project, and running into a weird issue. I
I'm trying to write a test case for Selenium and I'm having a little
Trying to set a sprite filename with an if statement, then load the proper
I'm trying to do set up some Selenium WebTests using PHPUnit, but php is
I am trying to create a test that can enter a username and password
I'm trying to test a chat application and I have been facing a specific

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.