Class SessionName


  • public class SessionName
    extends Object
    • Field Detail

      • INVALID

        public static final SessionName INVALID
        An invalid session name; this might happen with a test which does not correctly set its session name, or does not care about because it does not use the WebDriver infrastructure.
      • className

        public final String className
      • methodName

        public final String methodName
      • params

        public final String params
      • timestamp

        public final String timestamp
    • Method Detail

      • from

        public static SessionName from​(String name)
        Parses a Web Driver session name from specified string.
        Parameters:
        name - the session name; must have 5 parts delimited by colon, following this format: class:method:paramsHash:threadId:timestamp wherein each part is optional
        Returns:
        the parsed , or INVALID if the name cannot be split into five parts
        Throws:
        NullPointerException - if the name is null
      • generateFromCurrentThreadAndTime

        public static String generateFromCurrentThreadAndTime()
      • asClassSession

        public SessionName asClassSession()
        Returns:
        a session name for a class-level test; only class-name and thread id are included
      • withClassName

        public SessionName withClassName​(String className)
        Returns:
        a clone of this object, except with this updated property (returns this if an identical value is passed).
      • withMethodName

        public SessionName withMethodName​(String methodName)
        Returns:
        a clone of this object, except with this updated property (returns this if an identical value is passed).
      • withParams

        public SessionName withParams​(String params)
        Returns:
        a clone of this object, except with this updated property (returns this if an identical value is passed).
      • withId

        public SessionName withId​(String id)
        Returns:
        a clone of this object, except with this updated property (returns this if an identical value is passed).
      • withTimestamp

        public SessionName withTimestamp​(String timestamp)
        Returns:
        a clone of this object, except with this updated property (returns this if an identical value is passed).
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object