lib/symbiont/pages.rb in symbiont-1.1.2 vs lib/symbiont/pages.rb in symbiont-1.2.0
- old
+ new
@@ -1,12 +1,19 @@
+require 'symbiont/ready'
+
module Symbiont
module Pages
include Helpers
- def view
+ def view(&block)
no_url_is_provided if asserted_url.nil?
browser.goto(asserted_url)
+ when_ready(&block) if block_given?
self
+ end
+
+ def perform
+ view
end
def has_correct_url?
no_url_matches_is_provided if url_match.nil?
!(browser.url =~ url_match).nil?