public FindElement ( ISearchContext context ) : IWebElement | ||
context | ISearchContext | An |
return | IWebElement |
IWebElement element = driver.FindElement(By.Id("example-id"));
IWebElement element = driver.FindElement(By.Name("example-name"));
IWebElement element = driver.FindElement(By.ClassName("example-class"));These examples demonstrate how to use the FindElement method to locate an element on a webpage using different search methods. The package library used in these examples is OpenQA.Selenium.
public FindElement ( ISearchContext context ) : IWebElement | ||
context | ISearchContext | An |
return | IWebElement |