Book Image

Learning Selenium Testing Tools - Third Edition

Book Image

Learning Selenium Testing Tools - Third Edition

Overview of this book

Table of Contents (22 chapters)
Learning Selenium Testing Tools Third Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, you learned how to find elements using Selenium WebDriver elements.

Specifically, we covered:

  • Finding elements with helper methods: We saw what is needed to get things running and how to find elements on the page using Selenium WebDriver. We started with the helper methods to just start finding elements. In the following section, we saw how we can make them more robust.

  • Finding elements in a maintainable way: In this section, we learned how to find elements with a more maintainable approach. We just had to change the argument in the method signature.

  • Tips and tricks: Here, we learned how to find an element without throwing an exception. We also looked at waiting for elements to appear on the page. Elements can happen asynchronously, so we never know when they will appear.

  • List Of locating elements using WebDriver: WebDriver locatea elements on the page using the By abstract class. In WebDriver automation everything is related to web elements. WebElement is a DOM object...