Blog

Uncategorized

WebDriver: Differences between findElement and findElements

WebDriver: Differences between findElement and findElements

FindElement FindElements
Return Type WebElement List(java. Util) list of webElements
if the object was not there no such element found exception comes into picture list will return 0 element , it don’t throw any exceptions here
how it will find In the HTML page it will search for the object with the specified property. If there are multiple objects with the same property then it will perform action on the 1st object only This method will find all the elements in the entire webpage with the specified locators Sample
error: Content is protected !!