File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 4242 * @method array location() Determine an element's location on the page.
4343 * @method array location_in_view() Determine an element's location on the screen once it has been scrolled into view.
4444 * @method array size() Determine an element's size in pixels.
45- * @method string css($propertyName) Query the value of an element's computed CSS property.
4645 */
4746final class Element extends Container
4847{
@@ -66,7 +65,6 @@ protected function methods()
6665 'location ' => array ('GET ' ),
6766 'location_in_view ' => array ('GET ' ),
6867 'size ' => array ('GET ' ),
69- 'css ' => array ('GET ' ),
7068 );
7169 }
7270
@@ -114,6 +112,20 @@ public function getID()
114112 return $ this ->id ;
115113 }
116114
115+ /**
116+ * Query the value of an element’s computed CSS property: /session/:sessionId/element/:id/css/:propertyName
117+ *
118+ * @param string $propertyName
119+ *
120+ * @return mixed
121+ */
122+ public function css ($ propertyName )
123+ {
124+ $ result = $ this ->curl ('GET ' , "/css/ $ propertyName " );
125+
126+ return $ result ['value ' ];
127+ }
128+
117129 /**
118130 * {@inheritdoc}
119131 */
You can’t perform that action at this time.
0 commit comments