Fix to Blank Page Issue Requires Test Updates

We have introduced a solution to a blank page issue for Visualforce pages in Lightning Experience. This solution may break your UI test automations that cover Lightning Experience pages with embedded Visualforce pages. The content and structure of HTML, CSS, and the DOM in Lightning Experience can change at any time and is not a supported API. UI tests that reach into component internals using tools, such as Selenium WebDriver, are hard to maintain. This is not a change in Spring ’19, as we’ve never supported HTML, CSS and the DOM as a public API. We’re calling out the fragility of these tests again due to changes in this release as Lightning Experience continues to evolve with modern web standards.

Where: This release note applies to Lightning Experience.

How: If an embedded Visualforce page contains an <apex:form> that triggers a page navigation, like a Cancel button or any <apex:commandButton>, customers were seeing a blank page after clicking Cancel or when page navigation was triggered.

For your UI automation tests to pass, do not rely on DOM structure as an API. Instead, update your test code to call a method similar to this Selenium WebDriver example. Whenever the operation triggers a POST from the Visualforce page, it switches to the active Visualforce iFrame.
public void switchToNewActiveVFIframe() { 
   driver.switchTo().defaultContent(); 
   WebElement newActiveIframe = wdUtil.waitForElementVisible("Can't find the new active VF iframe", By.cssSelector("iframe[name^=vfFrameId]"), 10000); 
   driver.switchTo().frame(newActiveIframe); 
}

See DOM Inspection Tests Are Not Supported for more details.