Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added the description of the behavior of getValue on option elements

NodeElement::selectOption is expecting this behavior, which is indeed
necessary as the value of an option does not only depend on the value
attribute.
  • Loading branch information...
commit 59d7ca7f2756bbc896c260a96cbdc5168b298ee1 1 parent 61b3ff0
@stof stof authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/Behat/Mink/Element/NodeElement.php
View
8 src/Behat/Mink/Element/NodeElement.php
@@ -68,7 +68,7 @@ public function getTagName()
}
/**
- * Returns the value of the form field.
+ * Returns the value of the form field or option element.
*
* For checkbox fields, the value is a boolean indicating whether the checkbox is checked.
* For radio buttons, the value is the value of the selected button in the radio group
@@ -77,10 +77,12 @@ public function getTagName()
* For multiple select boxes, the value is an array of selected option values.
* for file inputs, the return value is undefined given that browsers don't allow accessing
* the value of file inputs for security reasons. Some drivers may allow accessing the
- * path of the file set in the field, but this is not required if it cannot be implemened.
+ * path of the file set in the field, but this is not required if it cannot be implemented.
* For textarea elements and all textual fields, the value is the content of the field.
+ * Form option elements, the value is the value of the option (the value attribute or the text
+ * content if the attribute is not set).
*
- * Calling this method on other elements than form fields is not allowed.
+ * Calling this method on other elements than form fields or option elements is not allowed.
*
* @return mixed
*/
Please sign in to comment.
Something went wrong with that request. Please try again.