Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "The WebElement
class also supports find methods to find child elements."
A block of code is set as follows:
<form name="loginForm"> <label for="username">UserName: </label> <input type="text" class="username" /></br> <label for="password">Password: </label> <input type="password" class="password" /></br> <input name="login" type="submit" value="Login" /> </form>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
//Locate all the Checkbox which are checked by calling jQuery find() method.
//find() method returns elements in array
List<WebElement> elements = (List<WebElement>) js.executeScript("return jQuery.find(':checked')");
Any command-line input or output is written as follows:
mvn clean test
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Right-click to open the pop-up menu and select the Inspect element option."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.