lib/firewatir/firefox.rb in firewatir-1.8.0.rc1 vs lib/firewatir/firefox.rb in firewatir-1.8.0
- old
+ new
@@ -104,9 +104,16 @@
set_browser_document()
js_eval "#{browser_var}.loadURI(\"#{url}\")"
wait()
end
+ # Returns true if Firefox window is opened.
+ def exists?
+ !!find_window(:url, @window_url)
+ end
+
+ alias_method :exist?, :exists?
+
# Loads the previous page (if there is any) in the browser. Waits for the page to get loaded.
def back()
js_eval "if(#{browser_var}.canGoBack) #{browser_var}.goBack()"
wait()
end