Created
March 27, 2013 13:33
-
-
Save walterg2/5254189 to your computer and use it in GitHub Desktop.
CucmberJVM, SeleniumWebDriver, HTMLUnit, Geb issue:
AJAX call firing when page loads is not able to be validated by script. As far as I'm aware, this should workas I'm waiting for the page to get the loanInformation object to be present
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.temp.myApp.cucumber.pages | |
import geb.Page | |
class HomePage extends Page { | |
static url = "" | |
static at = { title == "Home" } | |
static content = { | |
mainHeading { $('h1') } | |
loanInformation(required: false) { $('dl', 0) } | |
loanNumber(required: false) { $('dl > dd', 0) } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario Outline: Home page is displayed with the loan information | |
When I go to the Home Page with <Loan Number> at the end of the URL | |
Then I should be presented with the Home Page | |
And I should see the loan number of <Loan Number> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.temp.myApp.cucumber.steps | |
this.metaClass.mixin(cucumber.api.groovy.EN) | |
Then(~'^I should see the loan number of (\\d+)$') { String loanNumber -> | |
waitFor(10) { page.loanInformation.present } | |
assert page.loanNumberText() == loanNumber | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment