web » assertSelectOptionsPresent(locator,options)
Description
This command asserts that the specified options
can be found in the SELECT
element as denoted by locator
. Note
that the options
parameter is expected to represent the text of the OPTION
elements under the target SELECT
element, not the value
attribute of the OPTION
elements. Each of the OPTION
text is separated by
nexial.textDelimi
or a newline character. For example,
The highlighted (blue) portions are the text of the OPTION
elements mentioned above. So, if one desires to assert that
this SELECT
element contains, say, english
, suomi
and 中文
, the following would be the use of this command:
As shown above, the target OPTION
text is separated into individual line.
The corresponding step is considered as FAIL if:
- If the target
SELECT
element does not contain one or more of the specifiedOPTION
text. - If the target
SELECT
element contains noOPTION
child element.
Parameters
- locator - the locator of the target
SELECT
element. - options - the text of the child
OPTION
element(s) of the targetSELECT
element.