Advanced Techniques

Explore more about locators in this lesson, and take your Selenium knowledge to the next level.

We'll cover the following...

Chaining findElement to find child elements

Aside from using XPath for a page containing more than one element with the same attributes, we can also use the technique of chaining findElement to find a child element.

For instance, consider the following HTML code:

HTML:

<div id="div1">
  <input type="checkbox" name="same" value="on"> Same checkbox in Div 1
</div> 
...