public static InitElements ( ISearchContext driver, object page ) : void | ||
driver | ISearchContext | The driver used to find elements on the page. |
page | object | The Page Object to be populated with elements. |
return | void |
public LoginPage() { mobileGeneric = new MobileGeneric(); locatorHelper = new LocatorHelper(Driver, Config.OperatingSystem.ToLower()); PageFactory.InitElements(Driver, this); }
//EAPageObject //[FindsBy(How = How.Id, Using ="TitleId")] // identify element, How = how to find //public IWebElement TitleId { get; set; } public pom() { PageFactory.InitElements(Props.driver, this); }
public loginObj() { PageFactory.InitElements(Props.driver, this); }
public TablePage() //pom { PageFactory.InitElements(Driver, this); }
/// <summary> /// Asserts that getElement yields an element which can be interacted with, with no constraints on element lookups /// </summary> private void AssertFindsElement(object page, Func <IWebElement> getElement) { PageFactory.InitElements(mockDriver, page); AssertFoundElement(getElement()); }