Class SelectedOptionText
java.lang.Object
net.serenitybdd.screenplay.playwright.questions.SelectedOptionText
- All Implemented Interfaces:
net.serenitybdd.screenplay.Question<String>
public class SelectedOptionText
extends Object
implements net.serenitybdd.screenplay.Question<String>
Get the text of the currently selected option in a select element.
Sample usage:
String selectedText = actor.asksFor(SelectedOptionText.of("#country"));
String selectedText = actor.asksFor(SelectedOptionText.of(COUNTRY_DROPDOWN));
-
Method Summary
Modifier and TypeMethodDescriptionansweredBy(net.serenitybdd.screenplay.Actor actor) static SelectedOptionTextGet selected option text from a select element identified by a selector.static SelectedOptionTextGet selected option text from a Target select 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