Пример #1
0
 public override void Init(DriverWrapper driver)
 {
     fieldEmail    = driver.GetByXpath("//input[@id='email']");
     fieldPassword = driver.GetByXpath("//input[@id='password']");
     btnLogin      = driver.GetByXpath("//input[@id='Login_button']");
     base.Init(driver);
 }
        public static T GetPOM <T>(DriverWrapper driver) where T : BasePageObject, new()
        {
            var pom = new T();

            pom.Init(driver);
            return(pom);
        }
Пример #3
0
 public override void Init(DriverWrapper driver)
 {
     base.Init(driver);
     btnChangeRole = driver.GetByXpath("//tbody/tr/td[contains(text(),'*****@*****.**')]/../td[6]/button");
     role          = driver.GetByXpath("//tbody/tr/td[contains(text(),'*****@*****.**')]/../td[3]");
     tableOfUsers  = driver.GetByXpath("//table[@id='user-list']");
 }
Пример #4
0
 public static string GetRole(DriverWrapper driver)
 {
     try
     {
         GetPOM <BasePageObject>(driver);
         WebElementWrapper role = driver.GetByXpath("//*[@class='menu_section']/h3", 1);
         return(role.GetText());
     }
     catch (WebDriverTimeoutException)
     {
         return(null);
     }
 }
Пример #5
0
        public override void Init(DriverWrapper driver)
        {
            base.Init(driver);
            language = GetPOM <LanguageChanger>(driver);

            nameInput        = driver.GetByXpath("//input[@id = 'name']");
            surnameInput     = driver.GetByXpath("//input[@id = 'surname']");
            phoneNumberInput = driver.GetByXpath("//input[@id='phone-number']");
            password         = driver.GetByXpath("//input[@id='password']");
            newPassword      = driver.GetByXpath("//input[@id='new-password']");
            confirmPassword  = driver.GetByXpath("//input[@id='password-repeat']");
            btnUpdateProfile = driver.GetByXpath("//button[@id='submit-button']");
            title            = driver.GetByXpath("//div[@class='title_left']//span");
            //imageSelect = driver.GetByXpath("//input[@id='image-file']");
        }
Пример #6
0
 public override void Init(DriverWrapper driver)
 {
     btnSignIn = driver.GetByXpath("//a[@id='Sign_in']", 10);
     btnSignUp = driver.GetByXpath("//a[@id='Sign_up']", 10);
     base.Init(driver);
 }
 public virtual void Init(DriverWrapper driver)
 {
     this.driver = driver;
 }
Пример #8
0
 public override void Init(DriverWrapper driver)
 {
     sidebar = new List <WebElementWrapper>();
     sidebar = driver.GetElementsByXpath("//ul[@class='nav side-menu']/li");
     base.Init(driver);
 }
Пример #9
0
 public override void Init(DriverWrapper driver)
 {
     header = GetPOM <Header>(driver);
     base.Init(driver);
 }
Пример #10
0
 public override void Init(DriverWrapper driver)
 {
     language = GetPOM <LanguageChanger>(driver);
     sidebar  = GetPOM <SidebarUsers>(driver);
     base.Init(driver);
 }