示例#1
0
        public void AddNewUser(string user, string random, string password)
        {
            var wait = new WebDriverWait(this.driver, TimeSpan.FromSeconds(10));

            AddUserButtonLocator.ClickEx(driver);

            AddEmailTextBoxLocator.WaitForElementPresentAndEnabled(driver).SendKeys($"{user}{random}@test.com");

            AddNameTextBoxLocator.SendKeys($"{user}{random}");

            AddSecurityGroupButtonLocator.Click();

            driver.FindElement(By.XPath($"//*[@id='_SecurityGroupIDNew-menu']//*[text()='{user}']")).Click();

            Utils.WaitUntilLoadingDisappears(driver);

            AddOfficeButtonLocator.Click();

            AddSanFranciscoLocator.Click();

            Utils.WaitUntilLoadingDisappears(driver);

            AddClientButtonLocator.Click();

            AddClientLuxoftLocator.Click();

            AddPasswordTextBoxLocator.SendKeys(password);

            AddConfirmPasswordTextBoxLocator.SendKeys(password);

            Utils.Scroll(SaveNewUserButtonLocator, driver);

            SaveNewUserButtonLocator.ClickEx(driver);

            Utils.WaitUntilLoadingDisappears(driver);
        }