function AssertLegacyTrait::getAllOptions

Same name in other branches
  1. 8.9.x core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::getAllOptions()

Get all option elements, including nested options, in a select.

Parameters

\Behat\Mink\Element\NodeElement $element: The element for which to get the options.

Return value

\Behat\Mink\Element\NodeElement[] Option elements in select.

Deprecated

in drupal:8.5.0 and is removed from drupal:10.0.0. Use $element->findAll('xpath', 'option') instead.

See also

https://www.drupal.org/node/3129738

1 call to AssertLegacyTrait::getAllOptions()
AssertLegacyTraitDeprecatedTest::testGetAllOptions in core/tests/Drupal/FunctionalTests/Core/Test/AssertLegacyTraitDeprecatedTest.php
Tests getAllOptions().

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 987

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function getAllOptions(NodeElement $element) {
    @trigger_error('AssertLegacyTrait::getAllOptions() is deprecated in drupal:8.5.0 and is removed from drupal:10.0.0. Use $element->findAll(\'xpath\', \'option\') instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);
    return $element->findAll('xpath', '//option');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.