spec/watirspec/elements/span_spec.rb in watir-6.9.1 vs spec/watirspec/elements/span_spec.rb in watir-6.10.0
- old
+ new
@@ -25,22 +25,19 @@
it "returns false if the element doesn't exist" do
expect(browser.span(id: "no_such_id")).to_not exist
expect(browser.span(id: /no_such_id/)).to_not exist
expect(browser.span(text: "no_such_text")).to_not exist
- expect(browser.span(text: /no_such_text/)).to_not exist
+ msg = /:text locator with RegExp values to find elements based on only visible text is deprecated. Use :visible_text instead./
+ expect { expect(browser.span(text: /no_such_text/)).to_not exist }.to output(msg).to_stdout_from_any_process
expect(browser.span(class: "no_such_class")).to_not exist
expect(browser.span(class: /no_such_class/)).to_not exist
expect(browser.span(index: 1337)).to_not exist
expect(browser.span(xpath: "//span[@id='no_such_id']")).to_not exist
end
it "raises TypeError when 'what' argument is invalid" do
expect { browser.span(id: 3.14).exists? }.to raise_error(TypeError)
- end
-
- it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
- expect { browser.span(no_such_how: 'some_value').exists? }.to raise_error(Watir::Exception::MissingWayOfFindingObjectException)
end
end
# Attribute methods
describe "#class_name" do