Record Class SetValueOptions

java.lang.Object
java.lang.Record
com.codeborne.selenide.SetValueOptions

public record SetValueOptions(SetValueMethod method, CharSequence value, CharSequence displayedText) extends Record
  • Constructor Details

    • SetValueOptions

      public SetValueOptions(SetValueMethod method, CharSequence value, CharSequence displayedText)
      Creates an instance of a SetValueOptions record class.
      Parameters:
      method - the value for the method record component
      value - the value for the value record component
      displayedText - the value for the displayedText record component
  • Method Details

    • withText

      public static SetValueOptions withText(CharSequence text)
      Text value to set into input field
    • withDate

      public static SetValueOptions withDate(LocalDate date)
      Text value to set into input field of type="date"
    • withDateTime

      public static SetValueOptions withDateTime(LocalDateTime dateTime)
      Text value to set into input field of type="datetime-local"
    • withTime

      public static SetValueOptions withTime(LocalTime time)
      Text value to set into input field of type="time"
    • usingMethod

      public SetValueOptions usingMethod(SetValueMethod method)
      How exactly the value should be set (either "sendKeys" or JavaScript call)
    • withDisplayedText

      public SetValueOptions withDisplayedText(CharSequence displayedText)
      How this value will be displayed in reports. Useful to mask sensitive values like passwords etc.
    • sensitive

      public SetValueOptions sensitive()
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • method

      public SetValueMethod method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • value

      public CharSequence value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • displayedText

      public CharSequence displayedText()
      Returns the value of the displayedText record component.
      Returns:
      the value of the displayedText record component