This commit is contained in:
John Bintz 2012-11-27 17:10:55 -05:00
commit 98ffec349f
2 changed files with 11 additions and 0 deletions

View File

@ -26,7 +26,10 @@ module PersistentSelenium
def set_app_host(host) def set_app_host(host)
@app_host = host.dup @app_host = host.dup
load_splash_page
end
def load_splash_page
browser.navigate.to("data:text/html;base64,#{Base64.encode64(starting_page)}") browser.navigate.to("data:text/html;base64,#{Base64.encode64(starting_page)}")
end end
@ -40,6 +43,10 @@ module PersistentSelenium
# instead. # instead.
end end
end end
GC.enable
GC.start
GC.disable
end end
def starting_page def starting_page

View File

@ -1,4 +1,8 @@
require 'persistent_selenium' require 'persistent_selenium'
require 'capybara/selenium/driver'
# make sure these classes exist on this end
[ Selenium::WebDriver::Error::StaleElementReferenceError, Selenium::WebDriver::Error::UnhandledError, Selenium::WebDriver::Error::ElementNotVisibleError ]
Capybara.register_driver :persistent_selenium do |app| Capybara.register_driver :persistent_selenium do |app|
require 'drb' require 'drb'