lib/pagetience.rb in pagetience-0.2.1 vs lib/pagetience.rb in pagetience-0.3.0
- old
+ new
@@ -78,9 +78,15 @@
unless loaded?
raise Pagetience::Exceptions::Timeout, "Timed out after polling every #{@_poller.polling}s for #{@_poller.timeout}s waiting for the page to be loaded."
end
end
+ def transition_to(page, timeout=30, polling=1)
+ page = page.new browser
+ Pagetience::Meditate.for(timeout: timeout, polling: polling, msg: 'Timed out waiting for page transition.', expecting: true) { page.loaded? }
+ page
+ end
+
private
def determine_platform
@element_platform = Pagetience::ElementPlatforms::Base.find(self)