Here's my code
public static By headers = By.CssSelector("div[class*=hero-component] h1");
public int getHomePageHeaders() {
try
{
return webDriver.FindElements(headers).Count;
}
catch (Exception e)
{
return 0;
}
}
Other details: My tests are working properly on Chrome, Firefox, Edge and on iPhone12 but it fails on Safari.
I am using Selenium Webdriver (version 4.3.0)
Screenshot of the error: QuickWatch