Am trying to wait tll page loads before entering login credential, But it's not working in safari browser.
public static void WaitForPageLoad(this IWebDriver driver,int timeoutInSeconds = 15)
{
try
{
driver.WaitUntil(webDriver => webDriver.ExecuteJavaScript<string>("return document.readyState;")
.Equals("complete"), timeoutInSeconds);
}
catch (Exception ex)
{
Console.WriteLine($"Couldn't wait for page load to finish {ex}");
throw;
}
}
it