spec/watirspec/p_spec.rb in watir-webdriver-0.0.7 vs spec/watirspec/p_spec.rb in watir-webdriver-0.0.8
- old
+ new
@@ -18,9 +18,13 @@
browser.p(:class, /lead/).should exist
browser.p(:index, 0).should exist
browser.p(:xpath, "//p[@id='lead']").should exist
end
+ it "returns the first p if given no args" do
+ browser.p.should exist
+ end
+
it "returns false if the 'p' doesn't exist" do
browser.p(:id, "no_such_id").should_not exist
browser.p(:id, /no_such_id/).should_not exist
browser.p(:text, "no_such_text").should_not exist
browser.p(:text, /no_such_text/).should_not exist