Interface BrowseEventMount
-
- All Implemented Interfaces:
-
ai.platon.pulsar.skeleton.plugin.PluginMount
public interface BrowseEventMount implements PluginMount
Mount point for browse-phase event handlers.
The
PluginManagercalls configureBrowseHandlers with the active BrowseEventHandlers chain, allowing the plugin to register handlers on any browse-phase hook:onWillLaunchBrowser— before browser launchonBrowserLaunched— browser launched (first WebDriver access)onWillFetch— browse-phase fetchonWillNavigate— before navigationonNavigated— navigation completeonWillInteract— interaction startingonWillCheckDocumentState— document state checkonDocumentFullyLoaded— document fully loadedonWillScroll— before scrollingonDidScroll— scrolling completeonDocumentSteady— best for custom RPA actions (page stable)onWillComputeFeature— before feature computationonFeatureComputed— features computedonDidInteract— interaction completeonWillStopTab— before tab close (last chance for screenshots, etc.)onTabStopped— tab stoppedonFetched— browse-phase fetch complete
class CaptchaPlugin : BrowseEventMount { override fun configureBrowseHandlers(handlers: BrowseEventHandlers) { handlers.onDocumentSteady.addLast { page, driver -> detectAndSolveCaptcha(page, driver) } } }
-
-
Method Summary
Modifier and Type Method Description abstract UnitconfigureBrowseHandlers(BrowseEventHandlers handlers)Called by PluginManagerto let this plugin register handlers on any browse-phase event hook.-
-
Method Detail
-
configureBrowseHandlers
abstract Unit configureBrowseHandlers(BrowseEventHandlers handlers)
Called by
PluginManagerto let this plugin register handlers on any browse-phase event hook.- Parameters:
handlers- the active browse event handlers chain (never null at call time)
-
-
-
-