uses 2 fields, one for the search keyword, the second for the driver object

setUp() method for creating the driver object and opening the browser

tearDown() method for closing the driver object and closing the browser

one test script, testFirstResult(), that implements the test case

The typical test automation architecture uses the following layers:

In this architecture, each layer communicates only with the next layer so

test scripts communicate only with the framework classes; test scripts do not communicate directly with the WebDriver API

framework classes communicate with the WebDriver API; the framework classes are created using the page object model

WebDriver API communicates with the browser

Our test script looks pretty good from the test automation architecture point of view:

it uses the HomePage class for creating the home object

the search() method of the HomePage class implements the keyword search; since the result of a keyword search is opening the results page, the search method returns an object of the ResultsPage class (it returns a page object)

the selectResult() method of the ResultsPage class selects a result; since the outcome of clicking a result is going to the details page, the selectResult() method returns an object of the DetailsPage class

the correctBookTitle() method of the DetailsPage class is used for checking if the book title is displayed and it has more than 0 characters