java.lang.Object
net.serenitybdd.screenplay.playwright.questions.Value
All Implemented Interfaces:
net.serenitybdd.screenplay.Question<String>

public class Value extends Object implements net.serenitybdd.screenplay.Question<String>
Get the value of an input element.

Sample usage:

     String value = actor.asksFor(Value.of("#email"));
     String value = actor.asksFor(Value.of(EMAIL_FIELD));
 
  • Method Summary

    Modifier and Type
    Method
    Description
    answeredBy(net.serenitybdd.screenplay.Actor actor)
     
    static Value
    of(String selector)
    Get value for an input element identified by a selector.
    static Value
    of(Target target)
    Get value for a Target input element.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.serenitybdd.screenplay.Question

    as, asADate, asADate, asBigDecimal, asBoolean, asCollectionOf, asDouble, asEnum, asFloat, asInteger, asListOf, asLong, asString, describedAs, getSubject, map, mapEach
  • Method Details

    • of

      public static Value of(String selector)
      Get value for an input element identified by a selector.
    • of

      public static Value of(Target target)
      Get value for a Target input element.
    • answeredBy

      public String answeredBy(net.serenitybdd.screenplay.Actor actor)
      Specified by:
      answeredBy in interface net.serenitybdd.screenplay.Question<String>
    • toString

      public String toString()
      Overrides:
      toString in class Object