Chapter 3. Working with Elements

In this chapter, we will explore the various methods of Selenium WebDriver that interact with HTML elements displayed on the page. We will cover the following recipes:

  • Automating textboxes, text areas, and buttons
  • Checking an element's text
  • Checking an element's attribute and CSS values
  • 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
  • Working with WebTables

Introduction

Selenium WebDriver provides a very comprehensive API for working with different types of web elements performing User Interactions, executing JavaScript code, and supports various types of controls such as list, dropdown, radio buttons, and checkboxes.

In this chapter, we will explore how these features can be used to build simple to complex test steps. This chapter will also help you overcome some common issues faced while developing automated scripts with Selenium WebDriver. The chapter examples are created with Selenium WebDriver Java bindings. The sample code for this chapter contains some of these recipes implemented with C#, Ruby, and Python.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.28.9