Class: Selenium::WebDriver::BiDi::Protocol::Network Private

Inherits:
Domain
  • Object
show all
Defined in:
lib/selenium/webdriver/bidi/protocol/network.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: BytesValue, ContinueWithAuthParameters, UrlPattern

Constant Summary collapse

EVENTS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  auth_required: 'network.authRequired',
  before_request_sent: 'network.beforeRequestSent',
  fetch_error: 'network.fetchError',
  response_completed: 'network.responseCompleted',
  response_started: 'network.responseStarted'
}.freeze
COLLECTOR_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  blob: 'blob'
}.freeze
SAME_SITE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  strict: 'strict',
  lax: 'lax',
  none: 'none',
  default: 'default'
}.freeze
DATA_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  request: 'request',
  response: 'response'
}.freeze
INTERCEPT_PHASE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  before_request_sent: 'beforeRequestSent',
  response_started: 'responseStarted',
  auth_required: 'authRequired'
}.freeze
INITIATOR_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  parser: 'parser',
  script: 'script',
  preflight: 'preflight',
  other: 'other'
}.freeze
CONTINUE_WITH_AUTH_NO_CREDENTIALS_ACTION =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  default: 'default',
  cancel: 'cancel'
}.freeze
SET_CACHE_BEHAVIOR_PARAMETERS_CACHE_BEHAVIOR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  default: 'default',
  bypass: 'bypass'
}.freeze
AuthChallenge =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  scheme: {wire_key: 'scheme', primitive: 'string'},
  realm: {wire_key: 'realm', primitive: 'string'}
)
AuthCredentials =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  type: {fixed: 'password'},
  username: {wire_key: 'username', primitive: 'string'},
  password: {wire_key: 'password', primitive: 'string'}
)
BaseParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', nullable: true},
  is_blocked: {wire_key: 'isBlocked', primitive: 'boolean'},
  navigation: {wire_key: 'navigation', nullable: true},
  redirect_count: 'redirectCount',
  request: {wire_key: 'request', ref: 'Network::RequestData'},
  timestamp: 'timestamp',
  user_context: {wire_key: 'userContext', required: false, nullable: true},
  intercepts: {wire_key: 'intercepts', required: false, list: true}
)
StringValue =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  type: {fixed: 'string'},
  value: {wire_key: 'value', primitive: 'string'}
)
Base64Value =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  type: {fixed: 'base64'},
  value: {wire_key: 'value', primitive: 'string'}
)
Serialization::Record.define(
  name: {wire_key: 'name', primitive: 'string'},
  value: {wire_key: 'value', ref: 'Network::BytesValue'},
  domain: {wire_key: 'domain', primitive: 'string'},
  path: {wire_key: 'path', primitive: 'string'},
  size: 'size',
  http_only: {wire_key: 'httpOnly', primitive: 'boolean'},
  secure: {wire_key: 'secure', primitive: 'boolean'},
  same_site: {wire_key: 'sameSite', enum: 'Network::SAME_SITE'},
  expiry: {wire_key: 'expiry', required: false},
  extensible: true
)
CookieHeader =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  name: {wire_key: 'name', primitive: 'string'},
  value: {wire_key: 'value', ref: 'Network::BytesValue'}
)
FetchTimingInfo =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  time_origin: {wire_key: 'timeOrigin', primitive: 'number'},
  request_time: {wire_key: 'requestTime', primitive: 'number'},
  redirect_start: {wire_key: 'redirectStart', primitive: 'number'},
  redirect_end: {wire_key: 'redirectEnd', primitive: 'number'},
  fetch_start: {wire_key: 'fetchStart', primitive: 'number'},
  dns_start: {wire_key: 'dnsStart', primitive: 'number'},
  dns_end: {wire_key: 'dnsEnd', primitive: 'number'},
  connect_start: {wire_key: 'connectStart', primitive: 'number'},
  connect_end: {wire_key: 'connectEnd', primitive: 'number'},
  tls_start: {wire_key: 'tlsStart', primitive: 'number'},
  request_start: {wire_key: 'requestStart', primitive: 'number'},
  response_start: {wire_key: 'responseStart', primitive: 'number'},
  response_end: {wire_key: 'responseEnd', primitive: 'number'}
)
Header =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  name: {wire_key: 'name', primitive: 'string'},
  value: {wire_key: 'value', ref: 'Network::BytesValue'}
)
Initiator =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  column_number: {wire_key: 'columnNumber', required: false},
  line_number: {wire_key: 'lineNumber', required: false},
  request: {wire_key: 'request', required: false},
  stack_trace: {wire_key: 'stackTrace', required: false, ref: 'Script::StackTrace'},
  type: {wire_key: 'type', required: false, enum: 'Network::INITIATOR_TYPE'}
)
RequestData =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  request: 'request',
  url: {wire_key: 'url', primitive: 'string'},
  method_: {wire_key: 'method', primitive: 'string'},
  headers: {wire_key: 'headers', ref: 'Network::Header', list: true},
  cookies: {wire_key: 'cookies', ref: 'Network::Cookie', list: true},
  headers_size: 'headersSize',
  body_size: {wire_key: 'bodySize', nullable: true},
  destination: {wire_key: 'destination', primitive: 'string'},
  initiator_type: {wire_key: 'initiatorType', nullable: true, primitive: 'string'},
  timings: {wire_key: 'timings', ref: 'Network::FetchTimingInfo'}
)
ResponseContent =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(size: 'size')
ResponseData =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  url: {wire_key: 'url', primitive: 'string'},
  protocol: {wire_key: 'protocol', primitive: 'string'},
  status: 'status',
  status_text: {wire_key: 'statusText', primitive: 'string'},
  from_cache: {wire_key: 'fromCache', primitive: 'boolean'},
  headers: {wire_key: 'headers', ref: 'Network::Header', list: true},
  mime_type: {wire_key: 'mimeType', primitive: 'string'},
  bytes_received: 'bytesReceived',
  headers_size: {wire_key: 'headersSize', nullable: true},
  body_size: {wire_key: 'bodySize', nullable: true},
  content: {wire_key: 'content', ref: 'Network::ResponseContent'},
  auth_challenges: {wire_key: 'authChallenges', required: false, ref: 'Network::AuthChallenge', list: true}
)
SetCookieHeader =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  name: {wire_key: 'name', primitive: 'string'},
  value: {wire_key: 'value', ref: 'Network::BytesValue'},
  domain: {wire_key: 'domain', required: false, primitive: 'string'},
  http_only: {wire_key: 'httpOnly', required: false, primitive: 'boolean'},
  expiry: {wire_key: 'expiry', required: false, primitive: 'string'},
  max_age: {wire_key: 'maxAge', required: false},
  path: {wire_key: 'path', required: false, primitive: 'string'},
  same_site: {wire_key: 'sameSite', required: false, enum: 'Network::SAME_SITE'},
  secure: {wire_key: 'secure', required: false, primitive: 'boolean'}
)
UrlPatternPattern =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  type: {fixed: 'pattern'},
  protocol: {wire_key: 'protocol', required: false, primitive: 'string'},
  hostname: {wire_key: 'hostname', required: false, primitive: 'string'},
  port: {wire_key: 'port', required: false, primitive: 'string'},
  pathname: {wire_key: 'pathname', required: false, primitive: 'string'},
  search: {wire_key: 'search', required: false, primitive: 'string'}
)
UrlPatternString =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  type: {fixed: 'string'},
  pattern: {wire_key: 'pattern', primitive: 'string'}
)
AddDataCollectorParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  data_types: {wire_key: 'dataTypes', list: true, enum: 'Network::DATA_TYPE'},
  max_encoded_data_size: 'maxEncodedDataSize',
  collector_type: {wire_key: 'collectorType', required: false, enum: 'Network::COLLECTOR_TYPE'},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
AddDataCollectorResult =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(collector: 'collector')
AddInterceptParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  phases: {wire_key: 'phases', list: true, enum: 'Network::INTERCEPT_PHASE'},
  contexts: {wire_key: 'contexts', required: false, list: true},
  url_patterns: {wire_key: 'urlPatterns', required: false, ref: 'Network::UrlPattern', list: true}
)
AddInterceptResult =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(intercept: 'intercept')
ContinueRequestParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  request: 'request',
  body: {wire_key: 'body', required: false, ref: 'Network::BytesValue'},
  cookies: {wire_key: 'cookies', required: false, ref: 'Network::CookieHeader', list: true},
  headers: {wire_key: 'headers', required: false, ref: 'Network::Header', list: true},
  method_: {wire_key: 'method', required: false, primitive: 'string'},
  url: {wire_key: 'url', required: false, primitive: 'string'}
)
ContinueResponseParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  request: 'request',
  cookies: {wire_key: 'cookies', required: false, ref: 'Network::SetCookieHeader', list: true},
  credentials: {wire_key: 'credentials', required: false, ref: 'Network::AuthCredentials'},
  headers: {wire_key: 'headers', required: false, ref: 'Network::Header', list: true},
  reason_phrase: {wire_key: 'reasonPhrase', required: false, primitive: 'string'},
  status_code: {wire_key: 'statusCode', required: false}
)
DisownDataParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  data_type: {wire_key: 'dataType', enum: 'Network::DATA_TYPE'},
  collector: 'collector',
  request: 'request'
)
FailRequestParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(request: 'request')
GetDataParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  data_type: {wire_key: 'dataType', enum: 'Network::DATA_TYPE'},
  collector: {wire_key: 'collector', required: false},
  disown: {wire_key: 'disown', required: false, primitive: 'boolean'},
  request: 'request'
)
GetDataResult =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(bytes: {wire_key: 'bytes', ref: 'Network::BytesValue'})
ProvideResponseParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  request: 'request',
  body: {wire_key: 'body', required: false, ref: 'Network::BytesValue'},
  cookies: {wire_key: 'cookies', required: false, ref: 'Network::SetCookieHeader', list: true},
  headers: {wire_key: 'headers', required: false, ref: 'Network::Header', list: true},
  reason_phrase: {wire_key: 'reasonPhrase', required: false, primitive: 'string'},
  status_code: {wire_key: 'statusCode', required: false}
)
RemoveDataCollectorParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(collector: 'collector')
RemoveInterceptParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(intercept: 'intercept')
SetCacheBehaviorParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  cache_behavior: {wire_key: 'cacheBehavior', enum: 'Network::SET_CACHE_BEHAVIOR_PARAMETERS_CACHE_BEHAVIOR'},
  contexts: {wire_key: 'contexts', required: false, list: true}
)
SetExtraHeadersParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  headers: {wire_key: 'headers', ref: 'Network::Header', list: true},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
AuthRequiredParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', nullable: true},
  is_blocked: {wire_key: 'isBlocked', primitive: 'boolean'},
  navigation: {wire_key: 'navigation', nullable: true},
  redirect_count: 'redirectCount',
  request: {wire_key: 'request', ref: 'Network::RequestData'},
  timestamp: 'timestamp',
  user_context: {wire_key: 'userContext', required: false, nullable: true},
  intercepts: {wire_key: 'intercepts', required: false, list: true},
  response: {wire_key: 'response', ref: 'Network::ResponseData'}
)
BeforeRequestSentParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', nullable: true},
  is_blocked: {wire_key: 'isBlocked', primitive: 'boolean'},
  navigation: {wire_key: 'navigation', nullable: true},
  redirect_count: 'redirectCount',
  request: {wire_key: 'request', ref: 'Network::RequestData'},
  timestamp: 'timestamp',
  user_context: {wire_key: 'userContext', required: false, nullable: true},
  intercepts: {wire_key: 'intercepts', required: false, list: true},
  initiator: {wire_key: 'initiator', required: false, ref: 'Network::Initiator'}
)
FetchErrorParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', nullable: true},
  is_blocked: {wire_key: 'isBlocked', primitive: 'boolean'},
  navigation: {wire_key: 'navigation', nullable: true},
  redirect_count: 'redirectCount',
  request: {wire_key: 'request', ref: 'Network::RequestData'},
  timestamp: 'timestamp',
  user_context: {wire_key: 'userContext', required: false, nullable: true},
  intercepts: {wire_key: 'intercepts', required: false, list: true},
  error_text: {wire_key: 'errorText', primitive: 'string'}
)
ResponseCompletedParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', nullable: true},
  is_blocked: {wire_key: 'isBlocked', primitive: 'boolean'},
  navigation: {wire_key: 'navigation', nullable: true},
  redirect_count: 'redirectCount',
  request: {wire_key: 'request', ref: 'Network::RequestData'},
  timestamp: 'timestamp',
  user_context: {wire_key: 'userContext', required: false, nullable: true},
  intercepts: {wire_key: 'intercepts', required: false, list: true},
  response: {wire_key: 'response', ref: 'Network::ResponseData'}
)
ResponseStartedParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', nullable: true},
  is_blocked: {wire_key: 'isBlocked', primitive: 'boolean'},
  navigation: {wire_key: 'navigation', nullable: true},
  redirect_count: 'redirectCount',
  request: {wire_key: 'request', ref: 'Network::RequestData'},
  timestamp: 'timestamp',
  user_context: {wire_key: 'userContext', required: false, nullable: true},
  intercepts: {wire_key: 'intercepts', required: false, list: true},
  response: {wire_key: 'response', ref: 'Network::ResponseData'}
)
EVENT_TYPES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  'network.authRequired' => Network::AuthRequiredParameters,
  'network.beforeRequestSent' => Network::BeforeRequestSentParameters,
  'network.fetchError' => Network::FetchErrorParameters,
  'network.responseCompleted' => Network::ResponseCompletedParameters,
  'network.responseStarted' => Network::ResponseStartedParameters
}.freeze

Instance Method Summary collapse

Methods inherited from Domain

#initialize

Constructor Details

This class inherits a constructor from Selenium::WebDriver::BiDi::Protocol::Domain

Instance Method Details

#add_data_collector(data_types:, max_encoded_data_size:, collector_type: Serialization::UNSET, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 476

def add_data_collector(
  data_types:,
  max_encoded_data_size:,
  collector_type: Serialization::UNSET,
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  Serialization.validate!('dataTypes', data_types, Network::DATA_TYPE)
  Serialization.validate!('collectorType', collector_type, Network::COLLECTOR_TYPE)
  params = AddDataCollectorParameters.new(
    data_types: data_types,
    max_encoded_data_size: max_encoded_data_size,
    collector_type: collector_type,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'network.addDataCollector', params: params, result: Network::AddDataCollectorResult)
end

#add_intercept(phases:, contexts: Serialization::UNSET, url_patterns: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



497
498
499
500
501
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 497

def add_intercept(phases:, contexts: Serialization::UNSET, url_patterns: Serialization::UNSET)
  Serialization.validate!('phases', phases, Network::INTERCEPT_PHASE)
  params = AddInterceptParameters.new(phases: phases, contexts: contexts, url_patterns: url_patterns)
  execute(cmd: 'network.addIntercept', params: params, result: Network::AddInterceptResult)
end

#continue_request(request:, body: Serialization::UNSET, cookies: Serialization::UNSET, headers: Serialization::UNSET, method_: Serialization::UNSET, url: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 505

def continue_request(
  request:,
  body: Serialization::UNSET,
  cookies: Serialization::UNSET,
  headers: Serialization::UNSET,
  method_: Serialization::UNSET,
  url: Serialization::UNSET
)
  params = ContinueRequestParameters.new(
    request: request,
    body: body,
    cookies: cookies,
    headers: headers,
    method_: method_,
    url: url
  )
  execute(cmd: 'network.continueRequest', params: params)
end

#continue_response(request:, cookies: Serialization::UNSET, credentials: Serialization::UNSET, headers: Serialization::UNSET, reason_phrase: Serialization::UNSET, status_code: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 526

def continue_response(
  request:,
  cookies: Serialization::UNSET,
  credentials: Serialization::UNSET,
  headers: Serialization::UNSET,
  reason_phrase: Serialization::UNSET,
  status_code: Serialization::UNSET
)
  params = ContinueResponseParameters.new(
    request: request,
    cookies: cookies,
    credentials: credentials,
    headers: headers,
    reason_phrase: reason_phrase,
    status_code: status_code
  )
  execute(cmd: 'network.continueResponse', params: params)
end

#continue_with_auth(request:, action:, credentials: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



547
548
549
550
551
552
553
554
555
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 547

def continue_with_auth(request:, action:, credentials: Serialization::UNSET)
  Serialization.validate!(
    'action',
    action,
    {provide_credentials: 'provideCredentials', default: 'default', cancel: 'cancel'}
  )
  params = ContinueWithAuthParameters.build(request: request, action: action, credentials: credentials)
  execute(cmd: 'network.continueWithAuth', params: params)
end

#disown_data(data_type:, collector:, request:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



559
560
561
562
563
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 559

def disown_data(data_type:, collector:, request:)
  Serialization.validate!('dataType', data_type, Network::DATA_TYPE)
  params = DisownDataParameters.new(data_type: data_type, collector: collector, request: request)
  execute(cmd: 'network.disownData', params: params)
end

#fail_request(request:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



567
568
569
570
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 567

def fail_request(request:)
  params = FailRequestParameters.new(request: request)
  execute(cmd: 'network.failRequest', params: params)
end

#get_data(data_type:, request:, collector: Serialization::UNSET, disown: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



574
575
576
577
578
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 574

def get_data(data_type:, request:, collector: Serialization::UNSET, disown: Serialization::UNSET)
  Serialization.validate!('dataType', data_type, Network::DATA_TYPE)
  params = GetDataParameters.new(data_type: data_type, collector: collector, disown: disown, request: request)
  execute(cmd: 'network.getData', params: params, result: Network::GetDataResult)
end

#provide_response(request:, body: Serialization::UNSET, cookies: Serialization::UNSET, headers: Serialization::UNSET, reason_phrase: Serialization::UNSET, status_code: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 582

def provide_response(
  request:,
  body: Serialization::UNSET,
  cookies: Serialization::UNSET,
  headers: Serialization::UNSET,
  reason_phrase: Serialization::UNSET,
  status_code: Serialization::UNSET
)
  params = ProvideResponseParameters.new(
    request: request,
    body: body,
    cookies: cookies,
    headers: headers,
    reason_phrase: reason_phrase,
    status_code: status_code
  )
  execute(cmd: 'network.provideResponse', params: params)
end

#remove_data_collector(collector:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



603
604
605
606
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 603

def remove_data_collector(collector:)
  params = RemoveDataCollectorParameters.new(collector: collector)
  execute(cmd: 'network.removeDataCollector', params: params)
end

#remove_intercept(intercept:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



610
611
612
613
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 610

def remove_intercept(intercept:)
  params = RemoveInterceptParameters.new(intercept: intercept)
  execute(cmd: 'network.removeIntercept', params: params)
end

#set_cache_behavior(cache_behavior:, contexts: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



617
618
619
620
621
622
623
624
625
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 617

def set_cache_behavior(cache_behavior:, contexts: Serialization::UNSET)
  Serialization.validate!(
    'cacheBehavior',
    cache_behavior,
    Network::SET_CACHE_BEHAVIOR_PARAMETERS_CACHE_BEHAVIOR
  )
  params = SetCacheBehaviorParameters.new(cache_behavior: cache_behavior, contexts: contexts)
  execute(cmd: 'network.setCacheBehavior', params: params)
end

#set_extra_headers(headers:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



629
630
631
632
# File 'lib/selenium/webdriver/bidi/protocol/network.rb', line 629

def set_extra_headers(headers:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET)
  params = SetExtraHeadersParameters.new(headers: headers, contexts: contexts, user_contexts: user_contexts)
  execute(cmd: 'network.setExtraHeaders', params: params)
end