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.



193
194
195
# File 'lib/selenium/webdriver/common/element.rb', line 193

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