this is my first question here and I want to learn Selenuim. I am trying to add assertions in my script to verify that the text is available on the page. The code only works for the first assertion, and fails for the second. Is this the right way to user assertions? Thanks!
public void verifyCampaignStatusDropdownMenu() throws InterruptedException {
driver.findElement(By.linkText("TextOne"));
String wipText = "TextOne";
Assert.assertTrue("TextOne".equals(wipText), "TextOne text is available");
driver.findElement(By.linkText("TextTwo"));
String tempText = "TextTwo";
Assert.assertTrue("Template".equals(tempText), "TextTwo text is available" );
}