Interview Questions

Selenium WebDriver - What is the difference between findElement and findElements?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - What is the difference between findElement and findElements?

Both methods are abstract method of WebDriver interface and used to find the WebElement in a web page.
findElement() it used to find the one web element. It return only one WebElement type.
findElements()- it used to find more than one web element. It return List of WebElements.

(Continued on next question...)

Other Interview Questions