While executing automation scrits written n selenium using cucumber frame work iam getting the below exception
org.openqa.selenium.WebDriverException:
unknown error: Cannot read property 'defaultView' of undefined
Previously befor spring 19 release the scripts where passed .After spring 19 scripts are failing and showing ablve exception
public void waitForElementToBeDisplayed(WebElement element) {
driver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);
LOGGER.info("element is " +element);
LOGGER.info(String.format("Waiting for WebElement '%s' to be displayed", element.toString().replaceAll(".*-> ", "").replace("]", "")));
element = new WebDriverWait(driver, 40).until(ExpectedConditions.visibilityOf(element));
Assert.assertTrue(element.isDisplayed());
}