Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Selenium Testing Tools Cookbook
Selenium Testing Tools Cookbook

Selenium Testing Tools Cookbook: Unlock the full potential of Selenium WebDriver to test your web applications in a wide range of situations. The countless recipes and code examples provided ease the learning curve and provide insights into virtually every eventuality.

eBook
$9.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Selenium Testing Tools Cookbook

Chapter 1. Locating Elements

In this chapter, we will cover:

  • 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

Left arrow icon Right arrow icon

Key benefits

  • 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

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 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.

Who is this book 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.

What you will learn

  • 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
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 23, 2012
Length: 326 pages
Edition : 1st
Language : English
ISBN-13 : 9781849515740
Category :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Nov 23, 2012
Length: 326 pages
Edition : 1st
Language : English
ISBN-13 : 9781849515740
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 84.98
Selenium Testing Tools Cookbook
$48.99
Selenium Design Patterns and Best Practices
$35.99
Total $ 84.98 Stars icon
Banner background image

Table of Contents

11 Chapters
Locating Elements Chevron down icon Chevron up icon
Working with Selenium API Chevron down icon Chevron up icon
Controlling the Test Flow Chevron down icon Chevron up icon
Data-driven Testing Chevron down icon Chevron up icon
Using the Page Object Model Chevron down icon Chevron up icon
Extending Selenium Chevron down icon Chevron up icon
Testing on Mobile Browsers Chevron down icon Chevron up icon
Client-side Performance Testing Chevron down icon Chevron up icon
Testing HTML5 Web Applications Chevron down icon Chevron up icon
Recording Videos of Tests Chevron down icon Chevron up icon
Behavior-driven Development Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(23 Ratings)
5 star 30.4%
4 star 52.2%
3 star 13%
2 star 0%
1 star 4.3%
Filter icon Filter
Top Reviews

Filter reviews by




kotoko Mar 02, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very well written for someone who is beginning to learn working on Selenium as well as advancing to refining and enhancing knowledge. It presents a good information recipe to accomplish functional test scripts. It also, easy to understand for technical and non-technical
Amazon Verified review Amazon
Roy Fine Feb 10, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you are doing automated web testing, you should consider Selenium. Not a lot of info in the book that cannot be found online, but having it handy on my Kindle is well worth the modest price of the book. Note - the books works very nicely with Kindle HD and Kindle PC AppThe book is full of "How to do" cases with complete details, and at the end of each there is a "How it works" sections.Selenium API are available to supports several languages: Java, C#, Python, and others I suspect. All of our test work is driven from python - and fortunate for us there were plenty of plenty of python based examples in the bookIf you have experience in one of the driver languages, and if you are accomplished enough to have developed a website with more than just one page, then this book is a good first read. Others have noted it is not for the beginner - but I found it well written and detailed enough for the average web developer.
Amazon Verified review Amazon
M. Zuzic Jul 14, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I read this book cover to cover over the space of a week, which is the first time I've ever read an entire techical book before.You will benefit largely to have an understanding of programming languages when reading this book. In my case, I have a software development background and an automated test development background which must be why I found the book so interesting.I have started to apply the concepts detailed in the book to my current project which is proving to be a fantastic basis for a highly maintainable and well structured framework.Well done to the author, I will certainly cnsider future updates as Selenium evolves
Amazon Verified review Amazon
Michael Larsen Jan 21, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As the experience level with Selenium and other open source automation tools grows, naturally there will also develop more questions. How would I effectively access elements? What's a good way to compartmentalize tests? How can I make my tests extensible? What's the best way to parallelize tests? What if my project doesn't use a standard approach like so many others? What if I'm not on Linux, or don't use Java?The idea and benefit of a "Cookbook" approach is that it allows developers and testers to look at the aspects that they need at that time, and see how they work in example formats, and then see how they relate to other topics. Packt has decided to take this approach with Selenium by publishing the Selenium Testing Tools Cookbook. In it, author Unmesh Gundecha has broken down thirteen areas of interest (eleven in the book itself, plus two additional areas as bonus download sections), and presents small sections and ideas to allow the developer or tester to leverage the ability to create tests, use the Selenium API, and test applications such as browsers and mobile applications. The book demonstrates examples primarily in Java, but several are provided that use C#, Python and Ruby.For the tl;dr crowd, if you have never used Selenium before, this should not be the book to start your exploration. I would suggest reading David Burns "Selenium 2 Testing Tools Beginner's Guide" or Alan Richardson's "Selenium Simplified" first. David's book is also a Packt Publishing title, and uses many of the same documentation standards, so it would feel very natural looking at section's of David's book, and then coming back to try out more examples in Unmesh's Cookbook here.As this is a Cookbook style title, I must give a disclaimer that I have not yet tried every single example in the book. For that matter, I haven't gone through even a minority of the examples, and that's OK. Cookbook's are not designed to be read from cover to cover, and neither is this one. It is expected, and intended, that the user pick an area that interested them, and explore that area. Different projects have different needs, and being able to skip around will help focus the reader's time on the areas that matter most to them at that given time.Each chapter uses a similar structure, with an introduction to explain the tools and calls that will be used in that section. The given recipe is described and gives the reader an idea as to what can be done (along with sample code for each of the recipes, which can be downloaded from Packt's site if you prefer to see the projects in their entirety, and would rather not have to type out the examples from the book directly. Each item then goes through and describes what you will need to accomplish the project at hand (if you need tools like Firebug or Intellij IDEA, it tells you what you need and where to get them). The recipe concludes with a How it Works section, and in many cases, additional recipes that relate to the one you are working with.The book starts out with locating elements, and the different ways in which that can be accomplished (CSS, XPath, text values, jQuery, locating table rows and cells, etc.).Next the Selenium API is explored and the various methods available to examine and determine what you are looking at (text, attributes, CSS values, interacting with the mouse and keyboard, using JavaScript, capturing screenshots, drop downs and menu items, even going in and changing values in the Windows Registry if desired).Chapters Three and Four will be important to testers especially, since these chapters deal with test flow and ways to create data driven tests. Topics such as waiting for elements, handling pop-ups, determining if elements are the correct state, working with JavaScript alerts, handling frames and iFRAME's, plus using a variety of frameworks to interact with tests and set up data driven tests in these frameworks are explored, with examples for Java, win32, Ruby and Python.Chapter Five talks about the Page Object model and how to use it when developing your tests in the languages covered in the book (Java especially, but examples also show how to use .NET, Python and Ruby).Chapter Six gets into some examples of how to extend selenium and shows some in depth examples using Java (examples include making an extension class for web tables, jQueryUI Tab widget, creating an object map for Selenium tests, capturing screenshots and comparing images).Chapter Seven Shows how to perform mobile testing using Selenium, and some of the tools and ways to automate tests on iPhone an Android devices using RemoteWebDriver and other tools, such as the iWebDriver App to be used on a simulator or real device, or AndroidDriver on an android Simulator or device)Chapter Eight demonstrates some examples of how to get a handle on the Performance aspects of your sites or applications. Using timers, accessing and using BrowserMob proxy, and integrating with dynaTrace or HttpWatch are likewise covered. For the Ruby users among us, an example with Watir-WebDriver-Performance is demonstrated.Chapter Nine covers HTML5 and some of the unique tools provided with HTML5, JavaScript and CSS3, such as video widgets, canvas and web storage, and how to interact with those elements.Chapter Ten shows a number of ways in which a user could Record a Video of a Test (not record and playback of a test, actually recording an instance of the test being run as a video file, so it can be reviewed later. Tools such as the Monte Media Library (Java), Microsoft Expression Encoder (.NET) and Castro (Python) are demonstrated.Chapter Eleven discusses Behavior Driven Development (BDD). There are several different books that go into this topic at length, so for more on how this works and how to leverage that aspect, you will definitely want to read more than this single chapter. Still, if you are interested in how BDD can be performed in different environments, this will be of interest. The goal of TDD is meant to be a way to write test cases in a more natural language that those who do not program can both read and, in some cases, create themselves. Ruby users will find examples using Cucumber and Cabybara. Java users will see examples using Cucumber-JVM and JBehave. .NET uses will see examples using SpecFlow.NET.Two additional chapters, Integration with Other Tools and Distributed Testing with Selenium Grid are not included with the book itself, but can be downloaded from the Packt site. these deal with integrating with tools like Eclipse and IntelliJ IDEA, as well as using Ant and Maven for Continuous Integration, as well as parallelization of tests using Selenium Grid.Bottom Line:We now have a number of titles to help users get into the world of Selenium and SeleniumWebDrier. Each of these titles, by necessity, can only go so deep and with so many examples. For many, that would be fine. For those who want to know "what's next" or "where could I take these ideas and expand on them" or even "can you give me some ideas as to where I might use the variety of options?", then Selenium Testing Tools Cookbook may be a great next step to explore. One thing's for sure, there's plenty in this book to keep the Selenium enthusiast busy for quite some time.
Amazon Verified review Amazon
Aziz Mar 15, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Written for the Tester novice, this book is a concise, thorough, and accurate and helps immensely for Test Managers also.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela