View Javadoc

1   package com.atlassian.webdriver.debug;
2   
3   /**
4    * Abstraction of the underlying error retrieval mechanism.  The standard implementation is
5    * {@link DefaultErrorRetriever}; this can be overridden for unit testing of other classes
6    * that use the interface, or to perform custom post-processing of the results.
7    * @see com.atlassian.webdriver.testing.rule.JavaScriptErrorsRule
8    * @since 2.3
9    */
10  public interface JavaScriptErrorRetriever
11  {
12      /**
13       * Return true if the current driver supports retrieval of Javascript errors.
14       */
15      boolean isErrorRetrievalSupported();
16      
17      /**
18       * Attempt to retrieve Javascript errors from the current driver.  If this is not
19       * possible, return an empty Iterable.
20       */
21      Iterable<JavaScriptErrorInfo> getErrors();
22  }