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 can’t be considered a stable API. UI tests that reach into component internals using tools, such as Selenium WebDriver, require your ongoing maintenance. This is not a change in Spring ’19, as we’ve never guaranteed backward-compatible HTML, CSS and the DOM. 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. We understand the value that our customers gain from automated UI testing, and the maintenance burden this puts on them.

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); 
}

For more details, see DOM Inspection Tests Are Subject to Change.