samples/web->samples/httpsession

This commit is contained in:
Rob Winch
2014-12-17 16:14:57 -06:00
parent 7f9b5c0515
commit 8f3600c49a
11 changed files with 17 additions and 18 deletions

View File

@@ -0,0 +1,30 @@
package sample.pages
import geb.*
/**
* The home page
*
* @author Rob Winch
*/
class HomePage extends Page {
static url = ''
static at = { assert driver.title == 'Session Attributes'; true}
static content = {
form { $('form') }
submit { $('input[type=submit]') }
createAttribute(required:false) { name, value ->
form.attributeName = name
form.attributeValue = value
submit.click(HomePage)
}
attributes { moduleList AttributeRow, $("table tr").tail() }
}
}
class AttributeRow extends Module {
static content = {
cell { $("td", it) }
name { cell(0).text() }
value { cell(1).text() }
}
}