Class ElementBounds
java.lang.Object
net.serenitybdd.screenplay.playwright.questions.ElementBounds
- All Implemented Interfaces:
net.serenitybdd.screenplay.Question<BoundingBox>
public class ElementBounds
extends Object
implements net.serenitybdd.screenplay.Question<BoundingBox>
Get the bounding box (position and size) of an element.
Sample usage:
BoundingBox box = actor.asksFor(ElementBounds.of("#element"));
double width = box.getWidth();
double height = box.getHeight();
-
Method Summary
Modifier and TypeMethodDescriptionansweredBy(net.serenitybdd.screenplay.Actor actor) static ElementBoundsGet bounds for an element identified by a selector.static ElementBoundsGet bounds for a Target element.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
Get bounds for an element identified by a selector. -
of
Get bounds for a Target element. -
answeredBy
- Specified by:
answeredByin interfacenet.serenitybdd.screenplay.Question<BoundingBox>
-
toString
-