Skip to main content

Form fields

DrevOps\BehatSteps\Steps\Web\FieldTrait - Source, Steps

Manipulate form fields and verify widget functionality.

public function fieldDisableFormValidation(?string $selector = NULL): void

Disable browser validation for forms

public function fieldFillMultiValueItems(string $field, array $values): void

Fill in the items of a multi-value field widget with a list of values

public function fieldFind(string $field): ?NodeElement

Find a field by its id, name, label or value

public function fieldFindSelectOption(string $selector, string $option): ?NodeElement

Find an option of a select by its value or text

public function fieldGet(string $field): NodeElement

Get a field by its id, name, label or value

public function fieldGetAddMoreButtonSelectors(): array

CSS selectors for the "Add another item" button

public function fieldGetRadioButton(string $selector): NodeElement

Get a radio button by its id, name, label or value

public function fieldGetRequiredMarkerSelectors(): array

CSS selectors that indicate a required-field marker

public function fieldGetSelect(string $selector): NodeElement

Get a select by its id, name or label

public function fieldGetSelectOption(string $selector, string $option): NodeElement

Get an option of a select by its value or text

public function fieldIsMarkedRequired(NodeElement $field_element): bool

Check if a given field element is marked as required

public function fieldSetWysiwygValue(NodeElement $element, string $value): void

Set the value of a field that carries a WYSIWYG editor

public function fieldUnselectValue(NodeElement $select_field, string $value): void

Remove a value from the selection of a select