Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
behat_form_textarea Class Reference
Inheritance diagram for behat_form_textarea:
behat_form_text behat_form_field behat_form_availability behat_form_editor

Public Member Functions

 get_attribute ($name)
 Get the value of an attribute set on this field. More...
 
 get_value ()
 Returns the current value of the element. More...
 
 key_press ($char, $modifier=null)
 Presses specific keyboard key. More...
 
 matches ($expectedvalue)
 Matches the provided value against the current field value. More...
 
 set_value ($value)
 Sets the value to a field. More...
 

Protected Member Functions

 get_field_locator ($locatortype=false)
 Gets the field locator. More...
 
 get_internal_field_id ()
 Gets the field internal id used by selenium wire protocol. More...
 
 running_javascript ()
 Returns whether the scenario is running in a browser that can run Javascript or not. More...
 
 text_matches ($expectedvalue)
 Checks if the provided text matches the field value. More...
 
 wait_for_pending_js ()
 Waits for all the JS activity to be completed. More...
 

Protected Attributes

NodeElement $field
 The field DOM node to interact with.
 
string $fieldlocator = false
 The field's locator.
 
Session $session
 Behat session.
 

Member Function Documentation

◆ get_attribute()

behat_form_field::get_attribute (   $name)
inherited

Get the value of an attribute set on this field.

Parameters
string$nameThe attribute name
Return values
stringThe 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
coding_exception
Parameters
string$locatortype
Return values
string

◆ 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
coding_exception
Return values
int

◆ get_value()

behat_form_text::get_value ( )
inherited

Returns the current value of the element.

Return values
string

Reimplemented from behat_form_field.

◆ key_press()

behat_form_field::key_press (   $char,
  $modifier = null 
)
inherited

Presses specific keyboard key.

Parameters
mixed$charcould be either char ('b') or char-code (98)
string$modifierkeyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta')

◆ matches()

behat_form_text::matches (   $expectedvalue)
inherited

Matches the provided value against the current field value.

Parameters
string$expectedvalue
Return values
boolThe provided value matches the field value?

Reimplemented from behat_form_field.

Reimplemented in behat_form_editor.

◆ 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
bool

◆ set_value()

behat_form_text::set_value (   $value)
inherited

Sets the value to a field.

Parameters
string$value
Return values
void

Reimplemented from behat_form_field.

Reimplemented in behat_form_passwordunmask, behat_form_editor, behat_form_availability, and behat_form_autocomplete.

◆ text_matches()

behat_form_field::text_matches (   $expectedvalue)
protectedinherited

Checks if the provided text matches the field value.

Parameters
string$expectedvalue
Return values
bool

◆ wait_for_pending_js()

behat_form_field::wait_for_pending_js ( )
protectedinherited

Waits for all the JS activity to be completed.

Return values
boolWhether any JS is still pending completion.

The documentation for this class was generated from the following file: