<frameset>
<frame id="head">...</frame>
<frame id="main">...</frame>
</frameset>
static content = {
header(page: HeaderPage) { $('#head') }
main(page: MainPage) { $('#main') }
}
interact {
moveToElement(...)
click(...)
}
import geb.module.RadioButtons
import geb.module.Select
import geb.module.Textarea
$('select#...').module(Select).selected = 'some value'
$('select#...').module(Select).selectedText == 'label text'
$('select#...').module(RadioButtons) = 'some value'
$('select#...').module(RadioButtons).checked == 'some value'
$('select#...').module(Textarea).text = 'A sentence with\na new line.'
withFrame(main) {
leaveRequest.approver.selectedText == '西 部長'
leaveRequest.approvalDate.text == new Date().format('yyyy/MM/dd')
} || true
static content = {
requestType(wait: true, required: false) { $('input#rdo12').module(RadioButtons) }
requester(required: false) { $('span#select2-chosen-1') }
}
withAlert(wait: true) {
...
} == 'modal dialog message'
leaveRequest.approvalDate.text == new Date().format('yyyy/MM/dd')
@Grab('org.codehaus.groovy.modules.http-builder:http-builder')
import groovyx.net.http.HttpURLClient
def jsessionId = driver.manage().getCookieNamed("JSESSIONID").value
def http = new HttpURLClient(url: 'https://my-ocr.herokuapp.com/')
tryLogin(userId, password, http.request(path: jsessionId).data)