Class VisitNoopAndCancelAlertsRule

  • All Implemented Interfaces:
    org.junit.rules.TestRule

    public class VisitNoopAndCancelAlertsRule
    extends org.junit.rules.TestWatcher
    Cancels any editor, after the test completes, to prevent getting stuck on modal dialogs due to the dirty page warning.
    • Constructor Detail

      • VisitNoopAndCancelAlertsRule

        public VisitNoopAndCancelAlertsRule()
    • Method Detail

      • finished

        public void finished​(org.junit.runner.Description description)
        Navigates to a blank page and cleans up any dialogs attempting to block that navigation. Note that code.google.com/p/chromedriver/issues/detail?id=161 makes us need to catch an exception.
        Overrides:
        finished in class org.junit.rules.TestWatcher