Package: geb

## [Groovy] Interface PageEventListener

-     interface PageEventListener

  Implementations of this interface can be registered with Configuration to listen to certain Page events.

  See Also:
    PageEventListenerSupport
    CompositePageEventListener

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `abstract void` | `beforeAtCheck(Browser browser, Page page)` Called just before at checking is performed for a page
    `` | `abstract void` | `onAtCheckFailure(Browser browser, Page page)` Called just after at checking has failed for a page
    `` | `abstract void` | `onAtCheckSuccess(Browser browser, Page page)` Called just after at checking has succeeded for a page
    `` | `abstract void` | `pageWillChange(Browser browser, Page oldPage, Page newPage)` Called each time the browser's page instance changes.
    `` | `abstract void` | `unexpectedPageEncountered(Browser browser, Page unexpectedPage)` Called when an unexpected page is encountered

- - ### Method Detail

    - #### abstract void beforeAtCheck(Browser browser, Page page)

      Called just before at checking is performed for a page

      Parameters:
        `browser` - The Browser instance used to perform the at checking
        `page` - The Page for which the at checker is about to be verified

    - #### abstract void onAtCheckFailure(Browser browser, Page page)

      Called just after at checking has failed for a page

      Parameters:
        `browser` - The Browser instance used to perform the at checking
        `page` - The Page for which the at checker has failed

    - #### abstract void onAtCheckSuccess(Browser browser, Page page)

      Called just after at checking has succeeded for a page

      Parameters:
        `browser` - The Browser instance used to perform the at checking
        `page` - The Page for which the at checker has succeeded

    - #### abstract void pageWillChange(Browser browser, Page oldPage, Page newPage)

      Called each time the browser's page instance changes. Note that this is not when the browser navigates to a new page, but when it's page object changes.

      Parameters:
        `browser` - The Browser instance for which the page instance is about to change
        `oldPage` - The Page instance currently set on the browser
        `newPage` - The Page instance which is about to be set on the browser

    - #### abstract void unexpectedPageEncountered(Browser browser, Page unexpectedPage)

      Called when an unexpected page is encountered

      Parameters:
        `browser` - The Browser instance used to check for the unexpected page
        `unexpectedPage` - The unexpected Page for which the at checker has succeeded