I am writinng few tests. I see that there are places where the test automation engineer has used Assert and many other places the engineer has used Verify.
I would like to know the difference and how that will affect tests.
Eg.
Login script:
I enter the username and the password.
Assert the dashboard is loaded.
Login login = new Login(driver);
login.perform("admin", "admin");
Assert.assertTrue(Dashboard.getWelcomeMessage(driver).getText().contains("Welcome"));
Verifying the footer link:
if(isElementPresent(By.linkText("some footer link"))){
System.out.println("the Link found");
}
else{
System.out.println("the Link not found");
}
Kindly advise.