spec/element_spec.rb in watir-webdriver-0.4.1 vs spec/element_spec.rb in watir-webdriver-0.5.0
- old
+ new
@@ -30,17 +30,30 @@
end
end
describe "#exists?" do
it "should not propagate ObsoleteElementErrors" do
- browser.goto 'file://' + File.expand_path('html/removed_element.html', File.dirname(__FILE__))
+ browser.goto 'file://' + File.expand_path('../html/removed_element.html', __FILE__)
button = browser.button(:id => "remove-button")
element = browser.div(:id => "text")
element.should exist
button.click
element.should_not exist
+ end
+ end
+
+ describe "#hover" do
+ not_compliant_on [:webdriver, :firefox, :synthesized_events], [:webdriver, :ie] do
+ it "should hover over the element" do
+ browser.goto 'file://' + File.expand_path('../html/hover.html', __FILE__)
+ link = browser.a
+
+ link.style("font-size").should == "10px"
+ link.hover
+ link.style("font-size").should == "20px"
+ end
end
end
end