Skip to content

Instantly share code, notes, and snippets.

@hokuma
Created October 6, 2012 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hokuma/3843589 to your computer and use it in GitHub Desktop.
Save hokuma/3843589 to your computer and use it in GitHub Desktop.
Gebでページ操作を定義する ref: http://qiita.com/items/a8164a5f2eb7249a8e97
class ExamplePage extends Page {
static content = {
userId { $("form").find("input", name: "userId") }
userIdErr { $("span#userIdErr").text() }
}
}
class SearchPage extends Page {
static content = {
searchUser { key ->
$("#searchForm").find("input", name: "keyword").value(key)
$("#searchButton").click()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment