Class OptionsQuery
- Namespace
- CSF.Screenplay.Selenium.Queries
- Assembly
- CSF.Screenplay.Selenium.dll
A query to get the options within a <select> element.
public class OptionsQuery : IQuery<IReadOnlyList<Option>>, IHasName
- Inheritance
-
OptionsQuery
- Implements
- Inherited Members
Remarks
If the queried element is not an HTML <select> element then the outcome of this query
is undefined.
Constructors
OptionsQuery(bool, bool)
Initializes a new instance of the OptionsQuery class.
public OptionsQuery(bool excludeSelectedOptions = false, bool excludeUnselectedOptions = false)
Parameters
excludeSelectedOptionsboolIf set to
true, then options which are currently selected will not be included in the output.excludeUnselectedOptionsboolIf set to
true, then options which are currently not selected will not be included in the output.
Properties
Name
Gets the human-readable name of the current object.
public string Name { get; }
Property Value
Remarks
null is strongly discouraged here. All types which implement IHasName should return a non-null response from this property.
Methods
GetValue(SeleniumElement)
Gets the current value from a Selenium element.
public IReadOnlyList<Option> GetValue(SeleniumElement element)
Parameters
elementSeleniumElementThe Selenium element.
Returns
- IReadOnlyList<Option>
The value of type IReadOnlyList<Option>.