InitElements() public static method

Initializes the elements in the Page Object.
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);
 }
Example #2
0
File: pom.cs Project: intikz/sel1
        //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);
        }
Example #3
0
 public loginObj()
 {
     PageFactory.InitElements(Props.driver, this);
 }
Example #4
0
 public TablePage() //pom
 {
     PageFactory.InitElements(Driver, this);
 }
Example #5
0
        /// <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());
        }