I have a TestNG Selenium Script that will run in Chrome and Firefox, but fails when its run in Safari. I'm using an Assert to verify a name and Safari is having none of it. I'm still a noob so I'm not sure where to go from here. Thanks for any help
HTML:
<a href="https://xxxxxx/users/show/733981" target="_blank" xpath="1">Jeff Smith</a>
Safari Error:
java.lang.AssertionError: expected [JEFF SMITH] but found [Jeff Smith]
Code trial:
@Test(priority = 4)
public void VerifyGuest() {
WebElement guestName = driver.findElement(By.xpath("//a[contains(text(),'Jeff Smith')]"));
String expectedName = "JEFF SMITH";
String actualName = guestName.getText();
Assert.assertEquals(actualName, expectedName);
System.out.println("Reservation Code Belongs to " + actualName);
}