|
NodeElement | $field |
| The field DOM node to interact with.
|
|
string | $fieldlocator = false |
| The field's locator.
|
|
Session | $session |
| Behat session.
|
|
◆ get_attribute()
behat_form_field::get_attribute |
( |
|
$name | ) |
|
|
inherited |
Get the value of an attribute set on this field.
- Parameters
-
string | $name | The attribute name |
- Return values
-
string | The attribute value |
◆ get_field_locator()
behat_form_field::get_field_locator |
( |
|
$locatortype = false | ) |
|
|
protectedinherited |
Gets the field locator.
Defaults to the field label but you can specify other locators if you are interested.
Public visibility as in most cases will be hard to use this method in a generic way, as fields can be selected using multiple ways (label, id, name...).
- Exceptions
-
- Parameters
-
- Return values
-
◆ get_internal_field_id()
behat_form_field::get_internal_field_id |
( |
| ) |
|
|
protectedinherited |
Gets the field internal id used by selenium wire protocol.
Only available when running_javascript().
- Exceptions
-
- Return values
-
◆ get_value()
behat_form_radio::get_value |
( |
| ) |
|
Returns the radio input value attribute.
Here we can not extend behat_form_checkbox because isChecked() does internally a (bool)getValue() and it is not good for radio buttons.
- Return values
-
string | The value attribute |
Reimplemented from behat_form_checkbox.
◆ key_press()
behat_form_field::key_press |
( |
|
$char, |
|
|
|
$modifier = null |
|
) |
| |
|
inherited |
Presses specific keyboard key.
- Parameters
-
mixed | $char | could be either char ('b') or char-code (98) |
string | $modifier | keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta') |
◆ matches()
behat_form_checkbox::matches |
( |
|
$expectedvalue = false | ) |
|
|
inherited |
Is it enabled?
- Parameters
-
string | $expectedvalue | Anything !empty() is considered checked. |
- Return values
-
Reimplemented from behat_form_field.
◆ running_javascript()
behat_form_field::running_javascript |
( |
| ) |
|
|
protectedinherited |
Returns whether the scenario is running in a browser that can run Javascript or not.
- Return values
-
◆ set_value()
behat_form_radio::set_value |
( |
|
$value | ) |
|
Sets the value of a radio.
Partially overwriting behat_form_checkbox implementation as when JS is disabled we can not check() and we should use setValue()
- Parameters
-
- Return values
-
Reimplemented from behat_form_checkbox.
◆ text_matches()
behat_form_field::text_matches |
( |
|
$expectedvalue | ) |
|
|
protectedinherited |
Checks if the provided text matches the field value.
- Parameters
-
- Return values
-
◆ wait_for_pending_js()
behat_form_field::wait_for_pending_js |
( |
| ) |
|
|
protectedinherited |
Waits for all the JS activity to be completed.
- Return values
-
bool | Whether any JS is still pending completion. |
The documentation for this class was generated from the following file: