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 6218353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:35:40+00:00 2026-05-24T07:35:40+00:00

Please help. I have page login/auth.gsp with the following code inside the body <div

  • 0

Please help.

I have page login/auth.gsp

with the following code inside the body

<div id="page-wrap">
  <div class="login-block">
    <g:if test="${flash.message}">
      <h3  class='login_message'>${flash.message}</h3>
    </g:if>
    <g:else>
      <h3>IMMS Login</h3>
    </g:else>
    <form action='${postUrl}' method='POST' id='loginForm' class='cssform' autocomplete='off'>
      <p>
        <label for='username'><g:message code="auth.username.label" default="User Name"/></label>
        <input type='text' class='text_' name='j_username' id='username'/>
      </p>
      <p>
        <label for='password'><g:message code="auth.password.label" default="Password"/></label>
        <input type='password' class='text_' name='j_password' id='password'/>
      </p>
      <p class="submit-wrap">
        <input type='submit' value="${message(code: 'default.button.Login.label', default: 'Login')}"/>
      </p>
    </form>
  </div>
  <div class="image-block"></div>
</div>

Under test/functional/pages dir, I have LoginPage

package pages

import geb.Page

class LoginPage extends Page {
  static url = "login/auth/"
  static at = {
    userName.text() == ""
  }
  static content = {
    userName { $("input", name : "j_username") }
    password { $("input", name : "j_password") }
    loginButton(to: IndexPage){ $(".submit-wrap").find("input").first() }
  }
}

And here is my testing code

import geb.spock.GebReportingSpec
import pages.*
import spock.lang.Stepwise
@Stepwise
class BaseSpec extends GebReportingSpec {
  String getBaseUrl() {
    return "http://localhost:8080/IMMS/"
  }

  def "open URL"() {
    when:
    to LoginPage
    then:
    at LoginPage
  }

}

I run the test and failed. This is the report

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="0" failures="1" hostname="SGCDMSSVR" name="BaseSpec" tests="1" time="24.715" timestamp="2011-07-12T07:00:04">
  <properties />
  <testcase classname="BaseSpec" name="open URL" time="24.693">
    <failure message="Condition not satisfied:

at LoginPage
|
false
" type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: Condition not satisfied:

at LoginPage
|
false

    at BaseSpec.open URL(BaseSpec.groovy:18)
</failure>
  </testcase>
  <system-out><![CDATA[--Output from open URL--
]]></system-out>
  <system-err><![CDATA[--Output from open URL--
]]></system-err>
</testsuite>

Any idea to help me? am I missing some configuration or my jQuery-like navigation is incorrect?

For the testing, I’m using “Functional Test Development” plugin.


Update:
Initially I used GebConfig exactly from The sample.
I just noticed that the default driver is HTMLUnit.

When I run the functional test using Functional Test Development feature from command console.

grails develop-functional-tests

I select option to run all functional test. The console shown failed tests.

When I change the default driver to Firefox.
It still failed but I can see it automatically open Firefox browser and open the URL:

http://localhost:8080/IMMS/login/auth.gsp

and it failed to open the URL 404. I think this is the reason why the test failed.

I tried to run the following from IDE.

grails test-app -functional

It works and firefox browser opened and it did what’s written test script and the test pass.

So, I revise the title here. The focus now is on the grails’ functional test dev plugin.
Perhaps any of you ever tried this plugin and has answer?
Thanks.

PS: Am I allow to revise the question? or should I create new question in stackoverflow?

  • 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-24T07:35:40+00:00Added an answer on May 24, 2026 at 7:35 am

    I’ve asked the creator of the grails plugin here.
    So basically, it’s not about the test code problem. I just need to use different port for testing.

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

Sidebar

Related Questions

Please help! I have some form elements in a div on a page: <div
Please help regarding the following issue. I have enabled the Block popup option in
I might have wandered into wrong direction so please help. I have a page
I have created a login page. In this page i used div tag which
may be too simple groovy question but....please help i have a list like this:
Please help! Background info I have a WPF application which accesses a SQL Server
Please help! I have been grappling with this error for days and I cannot
Someone please help. I have an interesting issue. I am trying to implement an
Please help me about this issue... In my application i have calender where user
please help me to parse xml from another xml... i have this xml named

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.