Class Identification

  • All Implemented Interfaces:
    Serializable

    public class Identification
    extends Object
    implements Serializable
    The Identification class, this class is used to denote a specific element. Specifying a method and the value for that method.
    Author:
    mesbah
    See Also:
    Serialized Form
    • Constructor Detail

      • Identification

        public Identification()
        Default constructor to support saving instances of this class as an XML.
      • Identification

        public Identification​(Identification.How how,
                              String value)
        Create a new Identification.
        Parameters:
        how - the method of identification (xpath, id, name, ...)
        value - the value of the identification method.
    • Method Detail

      • setHow

        public void setHow​(Identification.How how)
        Parameters:
        how - the how to set
      • getValue

        public String getValue()
        Returns:
        the value
      • setValue

        public void setValue​(String value)
        Parameters:
        value - the value to set
      • toString

        public String toString()
        Convert a Identification to a String.
        Overrides:
        toString in class Object
        Returns:
        the String representation of the Identification
      • getWebDriverBy

        public org.openqa.selenium.By getWebDriverBy()
        Convert a Identification to a By used in WebDriver Drivers.
        Returns:
        the correct By specification of the current Identification.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object