diff --git a/rb/lib/selenium/webdriver/phantomjs/bridge.rb b/rb/lib/selenium/webdriver/phantomjs/bridge.rb index d205a565785af..670e7e00a1995 100644 --- a/rb/lib/selenium/webdriver/phantomjs/bridge.rb +++ b/rb/lib/selenium/webdriver/phantomjs/bridge.rb @@ -33,9 +33,8 @@ def initialize(opts = {}) url = opts.delete(:url) else args = opts.delete(:args) || caps['phantomjs.cli.args'] - port = opts.delete(:port) - @service = Service.default_service(port) + @service = Service.default_service @service.start(args) url = @service.uri diff --git a/rb/lib/selenium/webdriver/phantomjs/service.rb b/rb/lib/selenium/webdriver/phantomjs/service.rb index 8199735248158..a479e3af0ca6e 100644 --- a/rb/lib/selenium/webdriver/phantomjs/service.rb +++ b/rb/lib/selenium/webdriver/phantomjs/service.rb @@ -42,7 +42,7 @@ def self.executable_path ) end - def self.default_service(port = nil) + def self.default_service new executable_path, DEFAULT_PORT end