We are going to find an element on the page by using the
findElementsByName() method that is on each of the Browser Driver classes.
findElement calls will return a list of
WebElement objects that we can perform actions on.
Follow these steps to see how it works:
List<WebElement> elements = ((FindsByName)driver).findElementByName("selected(1234)"); Assert.equals(1, elements.size());
We have just seen how we can find an element ...