Interface BrowseEventMount

  • All Implemented Interfaces:
    ai.platon.pulsar.skeleton.plugin.PluginMount

    
    public interface BrowseEventMount
     implements PluginMount
                        

    Mount point for browse-phase event handlers.

    The PluginManager calls configureBrowseHandlers with the active BrowseEventHandlers chain, allowing the plugin to register handlers on any browse-phase hook:

    • onWillLaunchBrowser — before browser launch

    • onBrowserLaunched — browser launched (first WebDriver access)

    • onWillFetch — browse-phase fetch

    • onWillNavigate — before navigation

    • onNavigated — navigation complete

    • onWillInteract — interaction starting

    • onWillCheckDocumentState — document state check

    • onDocumentFullyLoaded — document fully loaded

    • onWillScroll — before scrolling

    • onDidScroll — scrolling complete

    • onDocumentSteady — best for custom RPA actions (page stable)

    • onWillComputeFeature — before feature computation

    • onFeatureComputed — features computed

    • onDidInteract — interaction complete

    • onWillStopTab — before tab close (last chance for screenshots, etc.)

    • onTabStopped — tab stopped

    • onFetched — browse-phase fetch complete

    class CaptchaPlugin : BrowseEventMount {
        override fun configureBrowseHandlers(handlers: BrowseEventHandlers) {
            handlers.onDocumentSteady.addLast { page, driver ->
                detectAndSolveCaptcha(page, driver)
            }
        }
    }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit configureBrowseHandlers(BrowseEventHandlers handlers) Called by PluginManager to let this plugin register handlers on any browse-phase event hook.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • configureBrowseHandlers

         abstract Unit configureBrowseHandlers(BrowseEventHandlers handlers)

        Called by PluginManager to let this plugin register handlers on any browse-phase event hook.

        Parameters:
        handlers - the active browse event handlers chain (never null at call time)