Geb (pronounced “jeb”)

very groovy browser automation… web testing, screen scraping and more

What is it?

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.

The Book of Geb contains all the information you need to get started with Geb.

What does it look like?

Here's what a simple Geb script to log into an admin section of a website might look like…
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"
}

This is what is known as the scripting style of Geb and it's great for quick automation.

Be sure to checkout the highlights in the right navigation bar, and of course the Book of Geb for in depth information on how to use Geb in your projects.