1List<WebElement> elementName = driver.findElements(By.LocatorStrategy("LocatorValue"));
1Differences between findElement and findElementS method?
2 --> findElement():
3
4 -It does returns SINGLE web element.
5 - Return type: WebElement
6 - If it cannot find a web element, it throw - NoSuchElementException
7
8
9 --> findElements():
10 - Returns a List of WebElements
11 - Return type: List<WebElement>