You are here

protected function WebformAssertLegacyTrait::getAllOptions in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Traits/WebformAssertLegacyTrait.php \Drupal\Tests\webform\Traits\WebformAssertLegacyTrait::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.

File

tests/src/Traits/WebformAssertLegacyTrait.php, line 823

Class

WebformAssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\Tests\webform\Traits

Code

protected function getAllOptions(NodeElement $element) {
  return $element
    ->findAll('xpath', '//option');
}