concept Geb in category java

This is an excerpt from Manning's book Java Testing with Spock.
Geb is a library that provides a Groovy abstraction on top of the popular Selenium/WebDriver[18] framework for automating a browser. If you’ve worked with Selenium, you already know what Geb does. What Geb brings to the table is excellent integration[19] with Spock and a jQuery-like language[20] for accessing web page content. If you already know jQuery (or any other similar CSS selector syntax), Geb will be familiar to you.
As a quick example, if you want to examine the text for the h2 header in a web page, Geb allows you to write the following:
$("h2").text()If you want to click the button with an ID myButton, Geb offers you this:
$("#myButton").click()With Geb, you reuse your knowledge of jQuery. If you’re not familiar with jQuery, you need to examine its documentation, and especially the part for CSS selectors, in order to fully use Geb.
Remember that Geb is an abstraction over Selenium/WebDriver, so it supports whatever browser implementations are already there. In the source code of the book, the default browser is Firefox, so if you run this test, a new Firefox instance will be launched on your computer and you’ll see it react automatically to the test definitions. You can use other browsers or even browser emulators (such as Phantom.js, http://phantomjs.org/) as other options. Consult the Geb documentation on how to achieve this.
To see the jQuery syntax of Geb, let’s modify the test to look at the page content in addition to the page title. You’ll test an HTML header (h1) and also make sure that the first tab of the user interface is selected. Figure 7.12 shows the expected result.