Geb is a browser automation solution. It brings together the power of WebDriver, the elegance of jQuery content selection, the robustness of Page Object modelling and the expressiveness of the Groovy language. It can be used for scripting, scraping and general automation — or equally as a functional/web/acceptance testing solution via integration with testing frameworks such as Spock, JUnit & TestNG. Geb provides integration modules for popular testing frameworks such as Spock, JUnit, TestNG and Cucumber (via Cuke4Duke). While Geb works great with all of these frameworks, it really shines with Spock. Spock is an innovative testing framework that is a great match for using with Geb. Using Spock + Geb gives you very clear, concise and easy to understand test specifications with very little effort.
import geb.Browser
Browser.drive {
go "http://myapp.com/login"
assert $("h1").text() == "Please Login"
$("form.login").with {
username = "admin"
password = "password"
login().click()
}
assert $("h1").text() == "Admin Section"
Points: 0
You voted ‘up’
View MANUFACTURERS Wallboard
Theme by Danetsoft and Danang Probo Sayekti