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

public class Count extends Object implements net.serenitybdd.screenplay.Question<Integer>
Get the count of matching elements.

Sample usage:

     Integer count = actor.asksFor(Count.of(".item"));
     Integer count = actor.asksFor(Count.of(LIST_ITEMS));
 
  • Method Summary

    Modifier and Type
    Method
    Description
    answeredBy(net.serenitybdd.screenplay.Actor actor)
     
    static Count
    of(String selector)
    Count elements matching a selector.
    static Count
    of(Target target)
    Count elements matching a Target.
     

    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 Count of(String selector)
      Count elements matching a selector.
    • of

      public static Count of(Target target)
      Count elements matching a Target.
    • answeredBy

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

      public String toString()
      Overrides:
      toString in class Object