Selenium Testing Tools Cookbook


Selenium Testing Tools Cookbook
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Learn to leverage the power of Selenium WebDriver with simple examples that illustrate real world problems and their workarounds
  • Each sample demonstrates key concepts allowing you to advance your knowledge of Selenium WebDriver in a practical and incremental way
  • Explains testing of mobile web applications with Selenium Drivers for platforms such as iOS and Android

Book Details

Language : English
Paperback : 326 pages [ 235mm x 191mm ]
Release Date : November 2012
ISBN : 1849515743
ISBN 13 : 9781849515740
Author(s) : Unmesh Gundecha
Topics and Technologies : All Books, Web Development, Cookbooks, Open Source

Table of Contents

Preface
Chapter 1: Locating Elements
Chapter 2: Working with Selenium API
Chapter 3: Controlling the Test Flow
Chapter 4: Data-driven Testing
Chapter 5: Using the Page Object Model
Chapter 6: Extending Selenium
Chapter 7: Testing on Mobile Browsers
Chapter 8: Client-side Performance Testing
Chapter 9: Testing HTML5 Web Applications
Chapter 10: Recording Videos of Tests
Chapter 11: Behavior-driven Development
Index
  • Chapter 1: Locating Elements
    • Introduction
    • Using browser tools for inspecting elements and page structure
    • Locating an element using the findElement method
    • Locating elements using findElements method
    • Locating links
    • Locating elements by tag name
    • Locating elements using CSS selectors
    • Locating elements using XPath
    • Locating elements using text
    • Locating elements using advanced CSS selectors
    • Using jQuery selectors
    • Locating table rows and cells
    • Locating child elements in a table
    • Chapter 2: Working with Selenium API
      • Introduction
      • Checking an element's text
      • Checking an element's attribute values
      • Checking an element's CSS values
      • Using Advanced User Interactions API for mouse and keyboard events
      • Performing double-click on an element
      • Performing drag-and-drop operations
      • Executing JavaScript code
      • Capturing screenshots with Selenium WebDriver
      • Capturing screenshots with RemoteWebDriver/Grid
      • Maximizing the browser window
      • Automating dropdowns and lists
      • Checking options in dropdowns and lists
      • Checking selected options in dropdowns and lists
      • Automating radio buttons and radio groups
      • Automating checkboxes
      • Controlling Windows processes
      • Reading a Windows registry value from Selenium WebDriver
      • Modifying a Windows registry value from Selenium WebDriver
      • Chapter 3: Controlling the Test Flow
        • Introduction
        • Synchronizing a test with an implicit wait
        • Synchronizing a test with an explicit wait
        • Synchronizing a test with custom-expected conditions
        • Checking an element's presence
        • Checking an element's status
        • Identifying and handling a pop-up window by its name
        • Identifying and handling a pop-up window by its title
        • Identifying and handling a pop-up window by its content
        • Handling a simple JavaScript alert
        • Handling a confirm box alert
        • Handling a prompt box alert
        • Identifying and handling frames
        • Identifying and handling frames by their content
        • Working with IFRAME
        • Chapter 4: Data-driven Testing
          • Introduction
          • Creating a data-driven test using JUnit
          • Creating a data-driven test using TestNG
          • Reading test data from a CSV file using JUnit
          • Reading test data from an Excel file using JUnit and Apache POI
          • Reading test data from a database using JUnit and JDBC
          • Creating a data-driven test in NUnit
          • Creating a data-driven test in MSTEST
          • Creating a data-driven test in Ruby using Roo
          • Creating a data-driven test in Python
          • Chapter 5: Using the Page Object Model
            • Introduction
            • Using the PageFactory class for exposing elements from a page
            • Using the PageFactory class for exposing an operation on a page
            • Using the LoadableComponent class
            • Implementing nested Page Object instances
            • Implementing the Page Object model in .NET
            • Implementing the Page Object model in Python
            • Implementing the Page Object model in Ruby by using the page-object gem
            • Chapter 6: Extending Selenium
              • Introduction
              • Creating an extension class for web tables
              • Creating an extension for the jQueryUI Tab widget
              • Implementing an extension for the WebElement object to set the element attribute values
              • Implementing an extension for the WebElement object to highlight elements
              • Creating an object map for Selenium tests
              • Capturing screenshots of elements in the Selenium WebDriver
              • Comparing images in Selenium
              • Chapter 7: Testing on Mobile Browsers
                • Introduction
                • Setting up the iWebDriver App for the iPhone/iPad simulator
                • Setting up the iWebDriver App for an iPhone/iPad device
                • Running tests on iOS using the iWebDriver App and iPhone driver
                • Setting up the Android emulator for Selenium
                • Setting up the Android device for Selenium
                • Running tests using AndroidDriver
                • Chapter 8: Client-side Performance Testing
                  • Introduction
                  • Measuring the response time using a timer
                  • Measuring performance with the Navigation Timing API
                  • Using the BrowserMob proxy for measuring performance
                  • Using dynaTrace for measuring the performance
                  • Using HttpWatch for measuring performance
                  • Client-side performance testing with Watir-WebDriver-Performance in Ruby
                  • Chapter 9: Testing HTML5 Web Applications
                    • Introduction
                    • Automating the HTML5 video player
                    • Automating interaction on the HTML5 canvas element
                    • Web storage – testing local storage
                    • Web storage – testing session storage
                    • Cleaning local and session storage
                    • Chapter 10: Recording Videos of Tests
                      • Introduction
                      • Recording videos of tests using Monte Media Library in Java
                      • Recording videos of tests using Microsoft Expression Encoder 4 SDK in .NET
                      • Recording videos of tests using Castro in Python
                      • Chapter 11: Behavior-driven Development
                        • Introduction
                        • Using Cucumber-JVM and Selenium WebDriver in Java for BDD
                        • Using SpecFlow.NET and Selenium WebDriver in .NET for BDD
                        • Using JBehave and Selenium WebDriver in Java
                        • Using Capybara, Cucumber, and Selenium WebDriver in Ruby

                        Unmesh Gundecha

                        Unmesh Gundecha has a Master’s Degree in Software Engineering and around 10 years of experience in Software Development and Testing. Unmesh has architected functional test automation projects using industry standard, in-house and custom test automation frameworks along with leading commercial and open source test automation tools. Presently he is working as Test Architect with a multinational company in Pune, India.

                        He is also author of Selenium Testing Tools Cookbook published by Packt in November 2012.

                        Code Downloads

                        Download the code and support files for this book.


                        Submit Errata

                        Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

                        Sample chapters

                        You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                        Frequently bought together

                        Selenium Testing Tools Cookbook +    HTML5 iPhone Web Application Development =
                        50% Off
                        the second eBook
                        Price for both: £24.64

                        Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                        What you will learn from this book

                        • Understand Locators and use various locator methods to build reliable tests
                        • Build reliable and maintainable tests with Selenium WebDriver API
                        • Use PageFactory Pattern to build a robust and easy- to-maintain test framework
                        • Build data driven tests and extend Selenium API to implement custom steps and checks
                        • Learn to integrate and use ATDD/BDD tools such as JBehave, SpecFlow, and FitNesses with Selenium WebDriver
                        • Set up iPhone/iPad & Android simulators and devices for testing your mobile web application
                        • Set up Selenium Grid for faster and parallel run of tests, increasing test coverage and reducing test execution time
                        • Capture screenshots and videos of test runs

                        In Detail

                        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 with Selenium WebDriver.

                        "Selenium Testing Tools Cookbook" is an incremental guide that will help you learn and use advanced features of Selenium WebDriver API in various situations for building reliable test automation. You will learn how to effectively use features of Selenium using simple and detailed examples. This book will also teach you best practices, design patterns, and how to extend Selenium.

                        "Selenium Testing Tools Cookbook" shows developers and testers who already use Selenium, how to go to the next step and build a highly maintainable and reliable test framework using advanced features of the tool.

                        The book starts with tips on advanced location strategy and effective use of Selenium WebDriver API. Then it demonstrates the use of design patterns such as Data Driven Tests and PageFactory for building maintainable test automation.

                        It also explains extending Selenium WebDriver API along with implementing custom tasks and setting up your own distributed environment to run tests in parallel.

                        It concludes with tips on integrating Selenium WebDriver with other popular tools, testing mobile web applications, and capturing videos of test runs. This books provides examples in Java, C#, Ruby, and Python.

                        "Selenium Testing Tools Cookbook" will help you in building a highly robust and maintainable test automation framework from start to finish.

                        Approach

                        This is a cookbook packed with code examples and step-by-step instructions to ease your learning curve.

                        Who this book is for

                        This book is intended for software quality assurance/testing professionals, software project managers, or software developers with prior experience in using Selenium and Java for testing web-based applications. This book also provides examples for C#, Python, and Ruby users.

                        Code Download and Errata
                        Packt Anytime, Anywhere
                        Register Books
                        Print Upgrades
                        eBook Downloads
                        Video Support
                        Contact Us
                        Awards Voting Nominations Previous Winners
                        Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                        Resources
                        Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software