Time for action – using findElements() - Selenium

In this section we are going to look at using the find Elements call that is on the WebDriver object. This is how we can normally find elements using Selenium WebDriver.

  1. Open your Java IDE. Intellij or Eclipse are the most used.

  2. We are going to use the command:

  3. Run your test.

What just happened?

We have used this similar to calls earlier in the chapter. This will find multiple elements on the page and return a list. This will not throw a NoSuchElement exception if it cannot find the element.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Selenium Topics