示例#1
0
        public void AddUserTest(string user, string password = password)
        {
            var menu = new MenuPage(driver);

            var wait = new WebDriverWait(this.driver, TimeSpan.FromSeconds(10));

            menu.AdministrationMenuLocator.ClickEx(driver);

            menu.UserManagementMenuLocator.Click();

            var userPage = new UserManagementPage(driver);

            userPage.AddNewUser(user, random, password);

            userPage.IdButtonLocator.ClickEx(driver);

            Thread.Sleep(1000);

            wait.Until(ExpectedConditions.TextToBePresentInElement(userPage.Id[0], "1"));

            userPage.IdButtonLocator.Click();

            Thread.Sleep(1000);

            Assert.AreEqual($"{user}{random}@test.com", userPage.Login[0].Text,
                            $"User {user} is not added");
        }