ebook img

Selenium Testing Tools Cookbook PDF

458 Pages·2012·3.93 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Selenium Testing Tools Cookbook

Table of Contents Selenium Testing Tools Cookbook Credits About the Author About the Reviewers www.PacktPub.com Support files, eBooks, discount offers and more Why Subscribe? Free Access for Packt account holders Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Downloading the example code Errata Piracy Questions 1. Locating Elements Introduction Using browser tools for inspecting elements and page structure How to do it... How it works... Locating an element using the findElement method How to do it... How it works... There's more... See also Locating elements using findElements method How to do it... How it works... See also Locating links How to do it... How it works... There's more... See also Locating elements by tag name How to do it... How it works... See also Locating elements using CSS selectors How to do it... Performing partial match on attribute values How it works... See also Locating elements using XPath How to do it... How it works... Locating elements using text How to do it... How it works... Locating elements using advanced CSS selectors How to do it... How it works... See also Using jQuery selectors How to do it... How it works... There's more... Locating table rows and cells How to do it... How it works... There's more… See also Locating child elements in a table How to do it... How it works... See also 2. Working with Selenium API Introduction Checking an element's text How to do it... How it works... There's more... Checking an element's attribute values How to do it... How it works... Checking an element's CSS values How to do it... How it works... See also Using Advanced User Interactions API for mouse and keyboard events How to do it... How it works... See also Performing double-click on an element How to do it... How it works... See also Performing drag-and-drop operations How to do it... How it works... See also Executing JavaScript code How to do it... How it works... There's more... Capturing screenshots with Selenium WebDriver How to do it... How it works... There's more... See also Capturing screenshots with RemoteWebDriver/Grid Getting ready How to do it... How it works... Maximizing the browser window Getting ready How to do it... How it works... Automating dropdowns and lists How to do it... How it works... There's more... See also Checking options in dropdowns and lists Getting ready How to do it... How it works... There's more... See also Checking selected options in dropdowns and lists Getting ready How to do it... How it works... There's more... See also Automating radio buttons and radio groups How to do it... How it works... Automating checkboxes How to do it... How it works... Controlling Windows processes How to do it... How it works... Reading a Windows registry value from Selenium WebDriver How to do it... How it works... See also Modifying a Windows registry value from Selenium WebDriver How to do it... How it works... See also 3. Controlling the Test Flow Introduction Pop ups and Alerts Synchronizing a test with an implicit wait How to do it... How it works... See also Synchronizing a test with an explicit wait How to do it... How it works... See also Synchronizing a test with custom-expected conditions How to do it... How it works... There's more... Waiting for element's attribute value update Waiting for an element's visibility Waiting for DOM events Checking an element's presence How to do it... How it works... See also Checking an element's status How to do it... How it works... Identifying and handling a pop-up window by its name How to do it... How it works... There is more... NoSuchWindowException See also Identifying and handling a pop-up window by its title How to do it... How it works... See also Identifying and handling a pop-up window by its content How to do it... How it works... See also Handling a simple JavaScript alert How to do it... How it works... There is more... NoAlertPresentException See also Handling a confirm box alert How to do it... How it works... See also Handling a prompt box alert How to do it... How it works... See also Identifying and handling frames How to do it... How it works... See also Identifying and handling frames by their content How to do it... How it works... See also Working with IFRAME How to do it... How it works... See also 4. Data-driven Testing Introduction Data-driven approach – workflow Benefits of data-driven testing Creating a data-driven test using JUnit Getting ready How to do it... How it works... See also Creating a data-driven test using TestNG Getting ready How to do it... How it works... There's more... See also Reading test data from a CSV file using JUnit Getting ready How to do it... How it works... See also Reading test data from an Excel file using JUnit and Apache POI Getting ready How to do it... How it works... See also Reading test data from a database using JUnit and JDBC Getting ready How to do it... How it works... See also Creating a data-driven test in NUnit Getting ready How to do it... How it works... See also Creating a data-driven test in MSTEST Getting ready How to do it... How it works... See also Creating a data-driven test in Ruby using Roo Getting ready How to do it... How it works... There's more... Creating a data-driven test in Python How to do it... How it works... 5. Using the Page Object Model Introduction Using the PageFactory class for exposing elements from a page Getting ready How to do it... How it works... FindBy annotations CacheLookUp Attribute Using the PageFactory class for exposing an operation on a page Getting ready How to do it... How it works... Using the LoadableComponent class Getting ready How to do it... How it works... Implementing nested Page Object instances Getting ready How to do it... How it works... See also Implementing the Page Object model in .NET Getting ready How to do it... How it works... Implementing the Page Object model in Python Getting ready How to do it... How it works... Implementing the Page Object model in Ruby by using the page-object gem Getting ready How to do it... How it works... 6. Extending Selenium Introduction Creating an extension class for web tables Getting ready How to do it... How it works... Creating an extension for the jQueryUI Tab widget Getting ready How to do it... How it works... There's more... Implementing an extension for the WebElement object to set the element attribute values Getting ready How to do it... How it works... See also Implementing an extension for the WebElement object to highlight elements Getting ready How to do it... How it works... See also Creating an object map for Selenium tests Getting ready How to do it... How it works... There's more… Capturing screenshots of elements in the Selenium WebDriver How to do it... How it works... See also Comparing images in Selenium Getting ready How to do it... How it works... There's more... See also 7. Testing on Mobile Browsers Introduction Setting up the iWebDriver App for the iPhone/iPad simulator Getting ready How to do it... How it works... There's more... See also Setting up the iWebDriver App for an iPhone/iPad device Getting ready How to do it... How it works... See also Running tests on iOS using the iWebDriver App and iPhone driver Getting ready How to do it...

Description:
Web technologies are becoming increasingly complex and there is a need to test your web applications against a vast number of browsers and platforms, so you need to build highly reliable and maintainable test automation. This book will help you test your web applications effectively and efficiently
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.