find element and find elements

Solutions on MaxInterview for find element and find elements by the best coders in the world

showing results for - "find element and find elements"
Ryland
24 Jul 2016
1List<WebElement> elementName = driver.findElements(By.LocatorStrategy("LocatorValue"));
Rafael
19 Mar 2018
1List<WebElement> listOfElements = driver.findElements(By.xpath("//div"));
Nicole
15 Apr 2017
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>
similar questions
queries leading to this page
find element and find elements