Geb Configuration
Geb Configuration Tips
Setting up parameterized form fields
Place the GebConfig.groovy in your test/functional folder
Then you add a block of code similar to the following:
//Values for form fields
formFields {
//Guest donate to a Non-profit Flow: Form field parameters
form1 {
field1 = "value1"
field2 = "value2"
}
}
Then you can reference those form fields in your functional tests that extend GebReportingTest like so:String searchValueParam = browser.config.rawConfig.formFields.form1.field1
This way you can have custom fields for each form for each functional test.
Custom baseUrl
You can set a custom baseUrl as a VM parameter using the following
1
| -Dgeb.build.baseUrl=http://localhost:8080/app/ |
This will be the base URL that your pages build their static url off. For instance your home page object with the static url
static url = /home/
Will resolve to http://localhost:8080/myApp/home/
Comments
Post a Comment