diff --git a/lib/persistent_selenium/browser.rb b/lib/persistent_selenium/browser.rb index ada1beb..e9c8eba 100644 --- a/lib/persistent_selenium/browser.rb +++ b/lib/persistent_selenium/browser.rb @@ -1,5 +1,6 @@ require 'capybara' require 'capybara/selenium/driver' +require 'base64' module PersistentSelenium class Browser < Capybara::Selenium::Driver @@ -26,7 +27,7 @@ module PersistentSelenium def set_app_host(host) @app_host = host - browser.navigate.to('about:blank') + browser.navigate.to("data:text/html;base64,#{Base64.encode64(starting_page)}") end def reset! @@ -40,6 +41,45 @@ module PersistentSelenium end end end + + def starting_page + <<-HTML + + + Persistent Selenium -- Starting up... + + + + + + + +
+

Persistent Selenium

+

Starting up...

+
+ + + HTML + end end end