public void DeleteClient() { { using (var driver = new ChromeDriver()) { driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); URLs.OpenUrl(driver); var loginPage = new LoginPage(driver); var navigationMenuPage = new NavigationMenuPage(driver); var addClientPage = new AddClientPage(driver); var clientSearchPage = new ClientSearchPage(driver); loginPage.Login(userName, password); navigationMenuPage.AddClientButtonClick(); addClientPage.FillOutContactInformation(customer); string id = addClientPage.GetClientId(); addClientPage.GetClientId().ShouldContain(id); addClientPage.DeleteButtonClick(); addClientPage.ConfirmDeleteButtonClick(); clientSearchPage.SearchInputId(id); clientSearchPage.SearchInputClick(); clientSearchPage.GetAllSeargPage().ShouldContain(clientSearchPage.GetNoRecords()); } } }
public void ClientSearchPageTest() { var userName = "******"; var password = "******"; string email = "*****@*****.**"; using (var driver = new ChromeDriver()) { driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); URLs.OpenUrl(driver); var loginPage = new LoginPage(driver); var clientSearchPage = new ClientSearchPage(driver); loginPage.Login(userName, password); clientSearchPage.SearchInputId(email); clientSearchPage.SearchInputClick(); clientSearchPage.GetSearchTableClient().ShouldContain("Iryna Shch"); } }
public void ClientSearch() { var loginInfo = new LoginData(); using (var driver = DriverUtils.CreateWebDriver()) { driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); driver.Navigate().GoToUrl(Config.GetUrl()); var accessLoginPage = new LoginPage(driver); accessLoginPage.FillOutLoginData(loginInfo); accessLoginPage.ClickLoginButton(); accessLoginPage.GetClientPageTitle().ShouldBe("Clients"); var clientSearchPage = new ClientSearchPage(driver); clientSearchPage.SearchClientBox("*****@*****.**"); clientSearchPage.ClickSearchButton(); clientSearchPage.VerifyTable1().ShouldBe("Teacher"); clientSearchPage.VerifyTable2().ShouldBe("First Name"); clientSearchPage.StudentFName().ShouldBe("Iryna"); clientSearchPage.StudentLName().ShouldBe("Shch"); } }