Permalink
Browse files

Element#style returns internal styles only for IE9

  • Loading branch information...
1 parent 20e9b18 commit d592645185ce152ffbed565560025e6096fa9246 @jarmo jarmo committed Mar 12, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −0 watir/lib/watir/element.rb
  2. +0 −3 watir/unittests/css_test.rb
@@ -115,6 +115,9 @@ def send_keys(*keys)
# return the css style as a string
def style
assert_exists
+ # this works for IE9
+ ole_object.currentStyle.cssText
+ rescue WIN32OLERuntimeError
ole_object.style.cssText
end
@@ -34,8 +34,5 @@ def test_inline_style
assert_match(/300px/, browser.form(:index, 0).style)
end
- def test_internal_style
- assert_match(/#f00/, browser.div(:id => "Container").style)
- end
end

0 comments on commit d592645

Please sign in to comment.