Chapter 1

  1. True or false: Selenium is a browser automation library.

True.

  1. What are the different types of locator mechanisms provided by Selenium?

The different types of locator mechanisms are ID, Name, ClassName, TagName, Link, LinkText, CSS Selector, and XPATH.

  1. True or false: With the getAttribute() method, we can read CSS attributes as well?

False. The getCssValue() method is used to read CSS attributes.

  1. What actions can be performed on a WebElement?

The actions performed are click, type (sendKeys), and submit.

  1. How can we determine whether the checkbox is checked or unchecked?

By using the isSelected() method.

Get Selenium WebDriver 3 Practical Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.