public void Login() { HomePageObjects homeObj = new HomePageObjects(); LoginPageObjects loginObj = homeObj.ToLoginPage(); loginObj.Login(ExcelLib.ReadData(1, "UserName"), ExcelLib.ReadData(1, "Password")); //checking is URL correct after loggin Assert.AreEqual("http://localhost:81/", PropertiesCollection.driver.Url.ToString()); //checking is login is correct on navbar Assert.AreEqual(homeObj.GetUserLoginStringInButton().ToLower(), ExcelLib.ReadData(1, "UserName").ToLower()); }
public void LoginIncorrectCredentials() { HomePageObjects homeObj = new HomePageObjects(); LoginPageObjects loginObj = homeObj.ToLoginPage(); loginObj.Login(ExcelLib.ReadData(2, "UserName"), ExcelLib.ReadData(2, "Password")); //checking is URL correct after loggin Assert.AreEqual("http://localhost:81/Account/Login", PropertiesCollection.driver.Url.ToString()); //checking is login is correct on navbar Assert.AreEqual("Niepoprawny login lub hasło.", loginObj.ErrorMessage()); }
public void AddContest() { Login(); HomePageObjects homeObj = new HomePageObjects(); homeObj.ShowDropdownList(); ContestListPageObjects contestListObj = homeObj.GoToContestListPage(); ContestAddPageObject contestAddPageObj = contestListObj.AddContest(); contestListObj = contestAddPageObj.CreateContest(ExcelLib.ReadData(1, "ContestName"), ExcelLib.ReadData(1, "ContestDate").Remove(10), ExcelLib.ReadData(1, "ContestDescription")); contestListObj = contestListObj.SearchContest(ExcelLib.ReadData(1, "ContestName")); Assert.AreEqual(contestListObj.GetNameOfContest(), ExcelLib.ReadData(1, "ContestName")); Assert.AreEqual(contestListObj.GetDateOfContest(), ExcelLib.ReadData(1, "ContestDate").Remove(10)); Assert.AreEqual(contestListObj.GetDescriptionOfContest(), ExcelLib.ReadData(1, "ContestDescription")); }
public void DeleteContest() { Login(); HomePageObjects homeObj = new HomePageObjects(); homeObj.ShowDropdownList(); ContestListPageObjects contestListObj = homeObj.GoToContestListPage(); contestListObj = contestListObj.SearchContest(ExcelLib.ReadData(1, "ContestName")); ContestConfirmDeletePageObjects contestConfirmDelObj = contestListObj.DeleteContest(); contestListObj = contestConfirmDelObj.ConfirmDelete(); contestListObj = contestListObj.SearchContest(ExcelLib.ReadData(1, "ContestName")); Assert.AreEqual(contestListObj.GetNameOfContest(), ""); Assert.AreEqual(contestListObj.GetDateOfContest(), ""); Assert.AreEqual(contestListObj.GetDescriptionOfContest(), ""); }
public void OpenHomePage() { HomePageObjects homeObj = new HomePageObjects(); }