Initializes the elements in the Page Object with the given type.
Namespace: OpenQA.Selenium.Support.PageObjects
Assembly: WebDriver.Support (in WebDriver.Support.dll) Version: 3.1.0
Syntax
Parameters
- driver
- Type: OpenQA.SeleniumIWebDriver
The IWebDriver instance used to populate the page.
Type Parameters
- T
- The Type of the Page Object class.
Return Value
Type: TAn instance of the Page Object class with the elements initialized.
Exceptions
Exception | Condition |
---|---|
ArgumentException |
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