persistent_selenium/lib/persistent_selenium.rb

29 lines
405 B
Ruby
Raw Normal View History

2012-11-26 16:36:43 +00:00
require "persistent_selenium/version"
2013-04-09 15:37:14 +00:00
require 'selenium-webdriver'
2012-11-26 16:36:43 +00:00
module PersistentSelenium
class << self
2013-05-14 14:57:55 +00:00
attr_writer :port, :browser, :timeout
2012-11-26 16:36:43 +00:00
def port
@port ||= 9854
end
def browser
@browser ||= :firefox
end
2013-05-14 14:57:55 +00:00
def timeout
@timeout ||= 120
end
2012-11-26 16:36:43 +00:00
def url
"druby://localhost:#{port}"
end
def configure
yield self
end
end
end