def add(name, value, opts = {})
      cookie = {
        name: name,
        value: value
      }
      cookie[:secure] = opts[:secure] if opts.key?(:secure)
      cookie[:path] = opts[:path] if opts.key?(:path)
      expires = opts[:expires]
      if expires
        cookie[:expires] = expires.is_a?(String) ? ::Time.parse(expires) : expires
      end
      cookie[:domain] = opts[:domain] if opts.key?(:domain)

      @control.add_cookie cookie
    end
def add(name, value, opts = {})
      cookie = {
        name: name,
        value: value
      }
      cookie[:secure] = opts[:secure] if opts.key?(:secure)
      cookie[:path] = opts[:path] if opts.key?(:path)
      expires = opts[:expires]
      if expires
        cookie[:expires] = expires.is_a?(String) ? ::Time.parse(expires) : expires
      end
      cookie[:domain] = opts[:domain] if opts.key?(:domain)

      @control.add_cookie cookie
    end
Adds new cookie.

 @example
   browser.cookies.add 'my_session', 'BAh7B0kiD3Nlc3Npb25faWQGOgZFRkk', secure: true

 @param [String] name
 @param [String] value
 @param [Hash] opts
 @option opts [Boolean] :secure
 @option opts [String] :path
 @option opts [Time, DateTime, NilClass] :expires
 @option opts [String] :domain