slashzero
13 years agoOccasional Contributor
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.
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
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