Package com.crawljax.core.state
Interface StateVertex
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AverageImageHashStateVertexImpl,BlockMeanImageHashStateVertexImpl,ColorHistogramStateVertexImpl,ColorMomentImageHashStateVertexImpl,DHashStateVertexImpl,HybridStateVertexImpl,LevenshteinStateVertexImpl,MarrHildrethImageHashStateVertexImpl,PDiffStateVertexImpl,PerceptualImageHashStateVertexImpl,RadialVarianceImageHashStateVertexImpl,RTEDStateVertexImpl,SIFTStateVertexImpl,SSIMStateVertexImpl,StateVertexForElementsWithVisualInfo,StateVertexImpl,TLSHStateVertexImpl
public interface StateVertex extends Serializable
A vertex in theStateFlowGraphrepresenting a state in the web application.
-
-
Method Summary
-
-
-
Field Detail
-
INDEX_ID
static final int INDEX_ID
ThegetId()of the Index state.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
Retrieve the name of the StateVertex.- Returns:
- the name of the StateVertex
-
getDom
String getDom()
Retrieve the DOM String.- Returns:
- the dom for this state
-
getStrippedDom
String getStrippedDom()
- Returns:
- the stripped dom by the oracle comparators
-
getUrl
String getUrl()
- Returns:
- the url
-
getId
int getId()
- Returns:
- the id. This is guaranteed to be unique per state.
-
getDocument
Document getDocument() throws IOException
- Returns:
- a Document instance of the dom string.
- Throws:
IOException- if an exception is thrown.
-
setDocument
void setDocument(Document dom)
-
setElementsFound
void setElementsFound(LinkedList<CandidateElement> elements)
- Parameters:
elements- Set the candidate elements for this state vertex that might be fired.
-
getCandidateElements
com.google.common.collect.ImmutableList<CandidateElement> getCandidateElements()
- Returns:
- A list of
CandidateElementthat might have been fired during the crawl. If an event was fired it is registered as anEventablean can be retrieved fromStateFlowGraph.getAllEdges(). If the candidates were not set because of an error it returnsnull.
-
hasNearDuplicate
boolean hasNearDuplicate()
-
setHasNearDuplicate
void setHasNearDuplicate(boolean b)
-
getNearestState
int getNearestState()
-
setNearestState
void setNearestState(int vertex)
-
inThreshold
boolean inThreshold(StateVertex vertexOfGraph)
-
getDistToNearestState
double getDistToNearestState()
-
setDistToNearestState
void setDistToNearestState(double distToNearestState)
-
getDist
double getDist(StateVertex vertexOfGraph)
-
getRootFragment
Fragment getRootFragment()
-
getClosestFragment
Fragment getClosestFragment(CandidateElement element)
-
hasUnexploredActions
boolean hasUnexploredActions()
-
addFragments
void addFragments(List<VipsRectangle> rectangles, org.openqa.selenium.WebDriver driver)
-
getCandidateElement
CandidateElement getCandidateElement(Eventable clone)
-
getCluster
int getCluster()
-
setCluster
void setCluster(int cluster)
-
getClosestDomFragment
Fragment getClosestDomFragment(CandidateElement element)
-
getCandidateElement
List<CandidateElement> getCandidateElement(Node equivalentNode)
-
setDirectAccess
void setDirectAccess(CandidateElement element)
-
isOnURL
boolean isOnURL()
-
setOnURL
void setOnURL(boolean onURL)
-
-