One of the most fundamental aspects of using Selenium is obtaining element references to work with. Selenium offers a number of built-in locator strategies to uniquely identify an element. There are many ways to use the locators in very advanced scenarios. For the purposes of this documentation, let’s consider this HTML snippet: <ol id="vegetables"> <li class="potatoes">… <li class="onions">… <li class="tomatoes"><span>Tomato is a Vegetable</span>… </ol> <ul id="fruits"> <li class="ba...