Package com.crawljax.clickabledetection
Class ClickableDetectorPlugin
- java.lang.Object
-
- com.crawljax.clickabledetection.ClickableDetectorPlugin
-
- All Implemented Interfaces:
OnNewStatePlugin,Plugin
public class ClickableDetectorPlugin extends Object implements OnNewStatePlugin
Requirements: Chrome Browser - [BrowserConfiguration.BrowserType] Chrome Developer Tools enabled - Default BrowserProvider : [BrowserOptions.setUSE_CDP(true)] - Custom BrowserProvider : [WebDriverBackedEmbeddedBrowser.setUSE_CDP(true)]For example usage, see ClickableDetectorExample in examples module
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static StringCDP_COMPUTEDSTYLESHEET_ALLstatic StringCDP_SCRIPTprivate static org.slf4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description ClickableDetectorPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfindClickables(EmbeddedBrowser browser, StateVertex newState)voidonNewState(CrawlerContext context, StateVertex newState)Method that is called when a new state is found.
-
-
-
Field Detail
-
LOG
private static final org.slf4j.Logger LOG
-
CDP_SCRIPT
public static final String CDP_SCRIPT
- See Also:
- Constant Field Values
-
CDP_COMPUTEDSTYLESHEET_ALL
static final String CDP_COMPUTEDSTYLESHEET_ALL
- See Also:
- Constant Field Values
-
-
Method Detail
-
onNewState
public void onNewState(CrawlerContext context, StateVertex newState)
Description copied from interface:OnNewStatePluginMethod that is called when a new state is found. When this method is called the state is already added to theStateFlowGraph.This method can be called from multiple threads with different
CrawlerContext- Specified by:
onNewStatein interfaceOnNewStatePlugin- Parameters:
context- the current context.newState- The new state. Equivalent toCrawlerContext.getCurrentState().
-
findClickables
public void findClickables(EmbeddedBrowser browser, StateVertex newState) throws IOException
- Throws:
IOException
-
-