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()); }