Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Override host and port no matter what the arguments of getNewBrowserS…
Browse files Browse the repository at this point in the history
…ession
  • Loading branch information
Martin Kleppmann committed Jul 5, 2009
1 parent fdf2ede commit b766091
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/selenium/client/base.rb
Expand Up @@ -48,8 +48,8 @@ module Base
def initialize(*args)
if args[0].kind_of?(Hash)
options = args[0]
@host = 'localhost' # options[:host]
@port = java.lang.System.getProperty('selenium.client.port').to_i # options[:port].to_i
@host = options[:host]
@port = options[:port].to_i
@browser_string = options[:browser]
@browser_url = options[:url]
@default_timeout_in_seconds = (options[:timeout_in_seconds] || 300).to_i
Expand All @@ -65,6 +65,10 @@ def initialize(*args)
@highlight_located_element_by_default = false
end

# Override any script-supplied host and port
@host = 'localhost'
@port = java.lang.System.getProperty('selenium.client.port').to_i

@extension_js = ""
@session_id = nil
end
Expand Down

0 comments on commit b766091

Please sign in to comment.