Forum Discussion

slashzero's avatar
slashzero
Occasional Contributor
13 years ago

Geb Script File runs in groovy console, but fails in loadUI

Description of Issue:
A simple script, written in the groovy console is working 100% OK. I can see my requests in the apache log.

Script Scenario:
The script loads a login page, fills in a user name and password, then clicks submit.

@Grab(group='org.codehaus.geb', module='geb-core', version='latest.release')
@Grab(group='org.seleniumhq.selenium', module='selenium-htmlunit-driver', version='latest.release')
import geb.Browser

Browser.drive {
clearCookiesQuietly()
go "https://the.web.site/login"

// simulate user think time to fill out the login form
sleep(5000)

$("form").with {
username = "auser@testdomain.info"
password = "121212121"
submit().click()
}
}


Groovy Console Result
Login request successful. Login page loads, followed by successful form submission after 5 seconds.

loadUI geb runner
Immediately ends up in the Completed/Failed bucket.

loadUI version: 2.1.2 on Windows 7 64bit.

What am I doing wrong? Really appreciate the help, as it seems like there is something wrong with the geb runner.

Regards,
Slashzero
  • slashzero's avatar
    slashzero
    Occasional Contributor
    Bump

    I am a bit surprised no one else has run into this.
  • Reminder: Bumping is forbidden in this forum.

    You can troubleshoot by looking in the system log or by running LoadUI the way described here.

    Henrik O
    SmartBear Software
  • slashzero's avatar
    slashzero
    Occasional Contributor
    heols wrote:
    Reminder: Bumping is forbidden in this forum.

    You can troubleshoot by looking in the system log or by running LoadUI the way described here.

    Henrik O
    SmartBear Software


    Hi Henrik,

    Thanks for the reply. Unfortunately, the system log does not tell me anything. It just prints out my script. I've tried putting log.info statements inside the Browser.drive { } block, and it looks like it never even makes it in there. a log.info before the Browser.drive {} block does print out in the system log. Any more ideas?
  • BUMP

    I've been dealing with something similar. Interested to get additional troubleshooting
  • slashzero's avatar
    slashzero
    Occasional Contributor
    Hi Henrik, or anyone,

    It looks to me like the geb runner can't handle HTTPS. I've seen a post that fixes HTTPS for the (Groovy) script runner, however I don't see anything specific to the geb runner.

    Regards,
    Slashzero