Method: Selenium::WebDriver::Element#css_value

Defined in:
lib/selenium/webdriver/common/element.rb

#css_value(prop) ⇒ Object Also known as: style

Get the value of the given CSS property

Note that shorthand CSS properties (e.g. background, font, border, border-top, margin, margin-top, padding, padding-top, list-style, outline, pause, cue) are not returned, in accordance with the DOM CSS2 specification - you should directly access the longhand properties (e.g. background-color) to access the desired values.



275
276
277
# File 'lib/selenium/webdriver/common/element.rb', line 275

def css_value(prop)
  bridge.element_value_of_css_property @id, prop
end