public void LogInBtnFocusEnterKey() { LoginPage loginPage = new LoginPage(driver); loginPage.ACCESSIBILITYNoUsrNoPwd(); //below the assert tries matching the expected error message against the error message of the element at each state. Assert.AreEqual("Epic sadface: Username is required", loginPage.pullErrorMsg()); loginPage.ACCESSIBILITYUserNoPwd(); Assert.AreEqual("Epic sadface: Password is required", loginPage.pullErrorMsg()); loginPage.ACCESSIBILITYIncorrectDetails(); Assert.AreEqual("Epic sadface: Username and password do not match any user in this service", loginPage.pullErrorMsg()); loginPage.ACCESSIBILITYLogin(); Assert.IsTrue(driver.Url == "https://www.saucedemo.com/inventory.html"); }