Method: Selenium::WebDriver::Safari::Bridge#initialize
- Defined in:
- lib/selenium/webdriver/safari/bridge.rb
#initialize(opts = {}) ⇒ Bridge
Returns a new instance of Bridge.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/selenium/webdriver/safari/bridge.rb', line 27 def initialize(opts = {}) command_timeout = Integer(opts[:timeout] || COMMAND_TIMEOUT) = opts.delete(:options) || Safari::Options.new(opts) capabilities = merge_capabilities(opts, ) @command_id ||= 0 # TODO: handle safari_opts['cleanSession'] @server = Server.new(.port, command_timeout) @server.start @safari = Browser.new @safari.start(prepare_connect_file) @server.wait_for_connection super(desired_capabilities: capabilities) end |