Initializes the elements in the Page Object with the given type.
Namespace: OpenQA.Selenium.Support.PageObjectsAssembly: WebDriver.Support (in WebDriver.Support.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax
public static T InitElements<T>( IWebDriver driver )
Parameters
- driver
- Type: OpenQA.Selenium IWebDriver
The IWebDriver instance used to populate the page.
Type Parameters
- T
- The
Type of the Page Object class.
Return Value
An instance of the Page Object class with the elements initialized.Exceptions
Exception | Condition |
---|---|
![]() |
thrown if no constructor to the class can be found with a single IWebDriver argument
-or- if a field or property decorated with the FindsByAttribute is not of type IWebElement or IList{IWebElement}. |
Remarks
See Also