class Selenium::WebDriver::BiDi::Network

def add_intercept(phases: [], contexts: nil, url_patterns: nil)

def add_intercept(phases: [], contexts: nil, url_patterns: nil)
  @bidi.send_cmd('network.addIntercept', phases: phases, contexts: contexts, urlPatterns: url_patterns)
end

def continue_with_auth(request_id, username, password)

def continue_with_auth(request_id, username, password)
  @bidi.send_cmd(
    'network.continueWithAuth',
    'request' => request_id,
    'action' => 'provideCredentials',
    'credentials' => {
      'type' => 'password',
      'username' => username,
      'password' => password
    }
  )
end

def initialize(bidi)

def initialize(bidi)
  @bidi = bidi
end

def on(event, &)

def on(event, &)
  event = EVENTS[event] if event.is_a?(Symbol)
  @bidi.add_callback(event, &)
end

def remove_intercept(intercept)

def remove_intercept(intercept)
  @bidi.send_cmd('network.removeIntercept', intercept: intercept)
end