def start_driver(http_client_ops =
                         { http_client: ::Appium::Http::Default.new, open_timeout: 999_999, read_timeout: 999_999 })
      @core.quit_driver

      # If automationName is set only in server side, then the following automation_name should be nil before
      # starting driver.
      automation_name = @core.automation_name

      @driver = @core.start_driver(server_url: server_url, http_client_ops: http_client_ops)
      @http_client = @core.http_client

      # if automation_name was nil before start_driver, then re-extend driver specific methods
      # to be able to extend correctly.
      extend_for(device: @core.device, automation_name: @core.automation_name) if automation_name.nil?

      @appium_server_status = appium_server_version

      @driver
    end
def start_driver(http_client_ops =
                         { http_client: ::Appium::Http::Default.new, open_timeout: 999_999, read_timeout: 999_999 })
      @core.quit_driver

      # If automationName is set only in server side, then the following automation_name should be nil before
      # starting driver.
      automation_name = @core.automation_name

      @driver = @core.start_driver(server_url: server_url, http_client_ops: http_client_ops)
      @http_client = @core.http_client

      # if automation_name was nil before start_driver, then re-extend driver specific methods
      # to be able to extend correctly.
      extend_for(device: @core.device, automation_name: @core.automation_name) if automation_name.nil?

      @appium_server_status = appium_server_version

      @driver
    end
Creates a new global driver and quits the old one if it exists.
 You can customise http_client as the following

 Read http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device to understand more what the driver
 can call instance methods.

 @example

   require 'rubygems'
   require 'appium_lib'

   # platformName takes a string or a symbol.
   # Start iOS driver
   opts = {
            caps: {
              platformName: :ios,
              app: '/path/to/MyiOS.app'
            },
            appium_lib: {
              wait_timeout: 30
            }
          }
   appium_driver = Appium::Driver.new(opts) #=> return an Appium::Driver instance
   appium_driver.start_driver #=> return an Appium::Core::Base::Driver

 @option http_client_ops [Hash] :http_client Custom HTTP Client
 @option http_client_ops [Hash] :open_timeout Custom open timeout for http client.
 @option http_client_ops [Hash] :read_timeout Custom read timeout for http client.
 @return [Selenium::WebDriver] the new global driver