RemoteWebDriverFindElements Method (By)WebDriver
Finds the elements on the page by using the By object and returns a ReadOnlyCollection of the Elements on the page

Namespace: OpenQA.Selenium.Remote
Assembly: WebDriver (in WebDriver.dll) Version: 3.1.0
Syntax

public ReadOnlyCollection<IWebElement> FindElements(
	By by
)

Parameters

by
Type: OpenQA.SeleniumBy
By mechanism to find the element

Return Value

Type: ReadOnlyCollectionIWebElement
ReadOnlyCollection of IWebElement

Implements

ISearchContextFindElements(By)
Examples

IWebDriver driver = new InternetExplorerDriver();
ReadOnlyCollection<IWebElement> classList = driver.FindElements(By.ClassName("class"));
See Also

Reference