Package com.crawljax.core
Class CandidateElement
- java.lang.Object
-
- com.crawljax.core.CandidateElement
-
-
Field Summary
Fields Modifier and Type Field Description (package private) FragmentclosestDomFragment(package private) FragmentclosestFragmentprivate booleandirectAccessprivate intduplicateAccessprivate Elementelementprivate intequivalentAccessprivate EventableConditioneventableConditionprivate Eventable.EventTypeeventTypeprivate com.google.common.collect.ImmutableList<FormInput>formInputsprivate Identificationidentificationprivate StringrelatedFrame
-
Constructor Summary
Constructors Constructor Description CandidateElement(Element sourceElement, Identification identification, String relatedFrame)CandidateElement(Element element, Identification identification, String relatedFrame, List<FormInput> formInputs)Constructor for a element a identification and a relatedFrame.CandidateElement(Element element, String xpath, List<FormInput> formInputs)Constructor for a element a xpath-identification and no relatedFrame.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallConditionsSatisfied(EmbeddedBrowser browser)Check all eventable Condition for correctness.FragmentgetClosestDomFragment()FragmentgetClosestFragment()intgetDuplicateAccess()ElementgetElement()intgetEquivalentAccess()Eventable.EventTypegetEventType()List<FormInput>getFormInputs()StringgetGeneralString()IdentificationgetIdentification()StringgetRelatedFrame()StringgetUniqueString()voidincrementDuplicateAccess()voidincrementEquivalentAccess()booleanisDirectAccess()voidsetClosestDomFragment(Fragment closestDom)voidsetClosestFragment(Fragment closestFragment)voidsetDirectAccess(boolean directAccess)voidsetDuplicateAccess(int duplicateAccess)voidsetEquivalentAccess(int equivalentAccess)voidsetEventableCondition(EventableCondition eventableCondition)voidsetEventType(Eventable.EventType eventType)StringtoString()booleanwasExplored()
-
-
-
Field Detail
-
identification
private final Identification identification
-
element
private final Element element
-
formInputs
private final com.google.common.collect.ImmutableList<FormInput> formInputs
-
relatedFrame
private final String relatedFrame
-
closestFragment
transient Fragment closestFragment
-
closestDomFragment
transient Fragment closestDomFragment
-
eventableCondition
private EventableCondition eventableCondition
-
duplicateAccess
private int duplicateAccess
-
equivalentAccess
private int equivalentAccess
-
directAccess
private boolean directAccess
-
eventType
private Eventable.EventType eventType
-
-
Constructor Detail
-
CandidateElement
public CandidateElement(Element element, Identification identification, String relatedFrame, List<FormInput> formInputs)
Constructor for a element a identification and a relatedFrame.- Parameters:
element- the element.identification- the identification.relatedFrame- the frame this element belongs to.
-
CandidateElement
public CandidateElement(Element element, String xpath, List<FormInput> formInputs)
Constructor for a element a xpath-identification and no relatedFrame.- Parameters:
element- the elementxpath- the xpath expression of the elementformInputs- the input data to be used for the form
-
CandidateElement
public CandidateElement(Element sourceElement, Identification identification, String relatedFrame)
-
-
Method Detail
-
getClosestFragment
public Fragment getClosestFragment()
-
setClosestFragment
public void setClosestFragment(Fragment closestFragment)
-
getDuplicateAccess
public int getDuplicateAccess()
-
setDuplicateAccess
public void setDuplicateAccess(int duplicateAccess)
-
getEquivalentAccess
public int getEquivalentAccess()
-
setEquivalentAccess
public void setEquivalentAccess(int equivalentAccess)
-
isDirectAccess
public boolean isDirectAccess()
-
setDirectAccess
public void setDirectAccess(boolean directAccess)
-
getEventType
public Eventable.EventType getEventType()
-
setEventType
public void setEventType(Eventable.EventType eventType)
-
getGeneralString
public String getGeneralString()
- Returns:
- unique string without atusa attribute
-
getUniqueString
public String getUniqueString()
- Returns:
- unique string of this candidate element
-
getElement
public Element getElement()
- Returns:
- the element
-
setEventableCondition
public void setEventableCondition(EventableCondition eventableCondition)
- Parameters:
eventableCondition- the EventableCondition
-
getIdentification
public Identification getIdentification()
- Returns:
- the identification object.
-
getRelatedFrame
public String getRelatedFrame()
- Returns:
- the relatedFrame
-
allConditionsSatisfied
public boolean allConditionsSatisfied(EmbeddedBrowser browser)
Check all eventable Condition for correctness.- Parameters:
browser- the current browser instance that contains the current dom- Returns:
- true if all conditions are satisfied or no conditions are specified
- See Also:
eventableCondition,EventableCondition.checkAllConditionsSatisfied(EmbeddedBrowser)
-
wasExplored
public boolean wasExplored()
-
getClosestDomFragment
public Fragment getClosestDomFragment()
-
setClosestDomFragment
public void setClosestDomFragment(Fragment closestDom)
-
incrementDuplicateAccess
public void incrementDuplicateAccess()
-
incrementEquivalentAccess
public void incrementEquivalentAccess()
-
-