public void Test8_checkIfLoggedInAdminPannel() { string userEmail = ConfigurationReader.GetValue("User1", "Username"); string userPassword = ConfigurationReader.GetValue("User1", "Password"); string adminName = ConfigurationReader.GetValue("Admin", "Username"); string adminPassword = ConfigurationReader.GetValue("Admin", "Password"); string expectedUserName = "******"; _homePage.GoToHomepage(); _homePage.GoToLogin(); _logInPage.LogIn(userEmail, userPassword); _logInPage.OpenNewTab(); _adminLoginPage.GoToAdminPage(); _adminLoginPage.LogIn(adminName, adminPassword); _adminPage.ClosePopup(); _adminPage.HoverCustomers(); _adminPage.GoToOnlineCustomersPage(); _customersPage.ClickOnFirstListItem(); Assert.That(_customerInfo.GetCustomersFullName, Contains.Substring(expectedUserName)); }
public void test3_adminLogin() { string userName = ConfigurationReader.GetValue("Admin", "Username"); string password = ConfigurationReader.GetValue("Admin", "Password"); string expectedResult = "Logged in as SandboxAdmin"; _adminLoginPage.GoToAdminPage(); _adminLoginPage.LogIn(userName, password); _adminPage.ClosePopup(); string actualResult = _adminPage.GetInfoBar(); Assert.That(actualResult, Contains.Substring(expectedResult)); }
public void Excercise2(string url, string loginName, string password, string firstName, string lastName, string email, string country) { driver.Navigate().GoToUrl(url); var adminLoginPage = new AdminLoginPage(driver); AdminPage adminPage = adminLoginPage.LogIn(loginName, password); adminPage.ClickAdmins(); AddAdminsPage addAdminsPage = adminPage.ClickAdd(); adminPage = addAdminsPage.AddNewAdmin(firstName, lastName, email, password, country); try { Assert.IsTrue(adminPage.IsRowExist(firstName, lastName, email), "Admin is not created"); } finally { adminPage.ClickDeleteAdmin(email); } }