36
36
* @method void clear() Clear a TEXTAREA or text INPUT element's value.
37
37
* @method boolean selected() Determine if an OPTION element, or an INPUT element of type checkbox or radiobutton is currently selected.
38
38
* @method boolean enabled() Determine if an element is currently enabled.
39
- * @method string attribute($attributeName) Get the value of an element's attribute.
40
39
* @method boolean equals($otherId) Test if two element IDs refer to the same DOM element.
41
40
* @method boolean displayed() Determine if an element is currently displayed.
42
41
* @method array location() Determine an element's location on the page.
@@ -59,7 +58,6 @@ protected function methods()
59
58
'clear ' => array ('POST ' ),
60
59
'selected ' => array ('GET ' ),
61
60
'enabled ' => array ('GET ' ),
62
- 'attribute ' => array ('GET ' ),
63
61
'equals ' => array ('GET ' ),
64
62
'displayed ' => array ('GET ' ),
65
63
'location ' => array ('GET ' ),
@@ -112,6 +110,20 @@ public function getID()
112
110
return $ this ->id ;
113
111
}
114
112
113
+ /**
114
+ * Get the value of an element's attribute: /session/:sessionId/element/:id/attribute/:name
115
+ *
116
+ * @param string name
117
+ *
118
+ * @return mixed
119
+ */
120
+ public function attribute ($ name )
121
+ {
122
+ $ result = $ this ->curl ('GET ' , "/attribute/ $ name " );
123
+
124
+ return $ result ['value ' ];
125
+ }
126
+
115
127
/**
116
128
* Query the value of an element’s computed CSS property: /session/:sessionId/element/:id/css/:propertyName
117
129
*
0 commit comments