Class CandidateElement


  • public class CandidateElement
    extends Object
    Candidate element for crawling. It is possible to link this Eventable to form inputs, so that Crawljax knows which values to set for this elements before it is clicked.
    • Field Detail

      • 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
      • duplicateAccess

        private int duplicateAccess
      • equivalentAccess

        private int equivalentAccess
      • directAccess

        private boolean directAccess
    • 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 element
        xpath - the xpath expression of the element
        formInputs - the input data to be used for the form
    • 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)
      • 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
      • getFormInputs

        public List<FormInput> getFormInputs()
        Returns:
        list with related formInputs
      • 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
      • wasExplored

        public boolean wasExplored()
      • getClosestDomFragment

        public Fragment getClosestDomFragment()
      • setClosestDomFragment

        public void setClosestDomFragment​(Fragment closestDom)
      • incrementDuplicateAccess

        public void incrementDuplicateAccess()
      • incrementEquivalentAccess

        public void incrementEquivalentAccess()