Finds the elements on the page by using the By object and returns a ReadOnlyCollection of the Elements on the page
Namespace: OpenQA.Selenium.RemoteAssembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax
public ReadOnlyCollection<IWebElement> FindElements( By by )
Parameters
- by
- Type: OpenQA.Selenium By
By mechanism to find the element
Return Value
ReadOnlyCollection of IWebElementImplements
ISearchContext FindElements(By)Examples
IWebDriver driver = new InternetExplorerDriver(); ReadOnlyCollection<IWebElement> classList = driver.FindElements(By.ClassName("class"));
See Also