[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Generic moodleforms field.
Copyright: | 2012 David Monllaó |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 260 lines (9 kb) |
Included or required: | 6 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
behat_form_field:: (10 methods):
__construct()
set_value()
get_value()
key_press()
matches()
guess_type()
running_javascript()
get_internal_field_id()
text_matches()
get_field_locator()
Class: behat_form_field - X-Ref
Representation of a form field.__construct(Session $session, NodeElement $fieldnode) X-Ref |
General constructor with the node and the session to interact with. param: Session $session Reference to Mink session to traverse/modify the page DOM. param: NodeElement $fieldnode The field DOM node return: void |
set_value($value) X-Ref |
Sets the value to a field. param: string $value return: void |
get_value() X-Ref |
Returns the current value of the select element. return: string |
key_press($char, $modifier = null) X-Ref |
Presses specific keyboard key. param: mixed $char could be either char ('b') or char-code (98) param: string $modifier keyboard modifier (could be 'ctrl', 'alt', 'shift' or 'meta') |
matches($expectedvalue) X-Ref |
Generic match implementation Will work well with text-based fields, extension required for most of the other cases. param: string $expectedvalue return: bool The provided value matches the field value? |
guess_type() X-Ref |
Guesses the element type we are dealing with in case is not a text-based element. This class is the generic field type, behat_field_manager::get_form_field() should be able to find the appropiate class for the field type, but in cases like moodle form group elements we can not find the type of the field through the DOM so we also need to take care of the different field types from here. If we need to deal with more complex moodle form elements we will need to refactor this simple HTML elements guess method. return: behat_form_field |
running_javascript() X-Ref |
Returns whether the scenario is running in a browser that can run Javascript or not. return: bool |
get_internal_field_id() X-Ref |
Gets the field internal id used by selenium wire protocol. Only available when running_javascript(). return: int |
text_matches($expectedvalue) X-Ref |
Checks if the provided text matches the field value. param: string $expectedvalue return: bool |
get_field_locator($locatortype = false) X-Ref |
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...). param: string $locatortype return: string |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |