Class: Selenium::WebDriver::BiDi::Protocol::BrowsingContext Private

Inherits:
Domain
  • Object
show all
Defined in:
lib/selenium/webdriver/bidi/protocol/browsing_context.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: ClipRectangle, DownloadEndParams, Locator

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.

{
  context_created: 'browsingContext.contextCreated',
  context_destroyed: 'browsingContext.contextDestroyed',
  dom_content_loaded: 'browsingContext.domContentLoaded',
  download_end: 'browsingContext.downloadEnd',
  download_will_begin: 'browsingContext.downloadWillBegin',
  fragment_navigated: 'browsingContext.fragmentNavigated',
  history_updated: 'browsingContext.historyUpdated',
  load: 'browsingContext.load',
  navigation_aborted: 'browsingContext.navigationAborted',
  navigation_committed: 'browsingContext.navigationCommitted',
  navigation_failed: 'browsingContext.navigationFailed',
  navigation_started: 'browsingContext.navigationStarted',
  user_prompt_closed: 'browsingContext.userPromptClosed',
  user_prompt_opened: 'browsingContext.userPromptOpened'
}.freeze
READINESS_STATE =

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.

{
  none: 'none',
  interactive: 'interactive',
  complete: 'complete'
}.freeze
USER_PROMPT_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.

{
  alert: 'alert',
  beforeunload: 'beforeunload',
  confirm: 'confirm',
  prompt: 'prompt'
}.freeze
CREATE_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.

{
  tab: 'tab',
  window: 'window'
}.freeze
INNER_TEXT_LOCATOR_MATCH_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.

{
  full: 'full',
  partial: 'partial'
}.freeze
CAPTURE_SCREENSHOT_PARAMETERS_ORIGIN =

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.

{
  viewport: 'viewport',
  document: 'document'
}.freeze
{
  portrait: 'portrait',
  landscape: 'landscape'
}.freeze
Info =

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(
  children: {wire_key: 'children', nullable: true, ref: 'BrowsingContext::Info', list: true},
  client_window: 'clientWindow',
  context: 'context',
  original_opener: {wire_key: 'originalOpener', nullable: true},
  url: {wire_key: 'url', primitive: 'string'},
  user_context: 'userContext',
  parent: {wire_key: 'parent', required: false, nullable: true}
)
AccessibilityLocator =

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: 'accessibility'},
  value: {wire_key: 'value', ref: 'BrowsingContext::AccessibilityLocator::Value'}
)
CssLocator =

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: 'css'},
  value: {wire_key: 'value', primitive: 'string'}
)
ContextLocator =

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: 'context'},
  value: {wire_key: 'value', ref: 'BrowsingContext::ContextLocator::Value'}
)
InnerTextLocator =

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: 'innerText'},
  value: {wire_key: 'value', primitive: 'string'},
  ignore_case: {wire_key: 'ignoreCase', required: false, primitive: 'boolean'},
  match_type: {wire_key: 'matchType', required: false, enum: 'BrowsingContext::INNER_TEXT_LOCATOR_MATCH_TYPE'},
  max_depth: {wire_key: 'maxDepth', required: false}
)
XPathLocator =

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: 'xpath'},
  value: {wire_key: 'value', primitive: 'string'}
)
BaseNavigationInfo =

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: 'context',
  navigation: {wire_key: 'navigation', nullable: true},
  timestamp: 'timestamp',
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', required: false}
)
Serialization::Record.define(
  context: 'context',
  navigation: {wire_key: 'navigation', nullable: true},
  timestamp: 'timestamp',
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', required: false}
)
ActivateParameters =

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: 'context')
CaptureScreenshotParameters =

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: 'context',
  origin: {wire_key: 'origin', required: false, enum: 'BrowsingContext::CAPTURE_SCREENSHOT_PARAMETERS_ORIGIN'},
  format: {wire_key: 'format', required: false, ref: 'BrowsingContext::ImageFormat'},
  clip: {wire_key: 'clip', required: false, ref: 'BrowsingContext::ClipRectangle'}
)
ImageFormat =

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: {wire_key: 'type', primitive: 'string'},
  quality: {wire_key: 'quality', required: false, primitive: 'integer'}
)
ElementClipRectangle =

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: 'element'},
  element: {wire_key: 'element', ref: 'Script::SharedReference'}
)
BoxClipRectangle =

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: 'box'},
  x: {wire_key: 'x', primitive: 'number'},
  y: {wire_key: 'y', primitive: 'number'},
  width: {wire_key: 'width', primitive: 'number'},
  height: {wire_key: 'height', primitive: 'number'}
)
CaptureScreenshotResult =

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: {wire_key: 'data', primitive: 'string'})
CloseParameters =

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: 'context',
  prompt_unload: {wire_key: 'promptUnload', required: false, primitive: 'boolean'}
)
CreateParameters =

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: {wire_key: 'type', enum: 'BrowsingContext::CREATE_TYPE'},
  reference_context: {wire_key: 'referenceContext', required: false},
  background: {wire_key: 'background', required: false, primitive: 'boolean'},
  user_context: {wire_key: 'userContext', required: false}
)
CreateResult =

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: 'context',
  user_context: {wire_key: 'userContext', required: false}
)
GetTreeParameters =

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(
  max_depth: {wire_key: 'maxDepth', required: false},
  root: {wire_key: 'root', required: false}
)
GetTreeResult =

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(
  contexts: {wire_key: 'contexts', ref: 'BrowsingContext::Info', list: true}
)
HandleUserPromptParameters =

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: 'context',
  accept: {wire_key: 'accept', required: false, primitive: 'boolean'},
  user_text: {wire_key: 'userText', required: false, primitive: 'string'}
)
LocateNodesParameters =

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: 'context',
  locator: {wire_key: 'locator', ref: 'BrowsingContext::Locator'},
  max_node_count: {wire_key: 'maxNodeCount', required: false},
  serialization_options: {
    wire_key: 'serializationOptions',
    required: false,
    ref: 'Script::SerializationOptions'
  },
  start_nodes: {wire_key: 'startNodes', required: false, ref: 'Script::SharedReference', list: true}
)
LocateNodesResult =

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(
  nodes: {wire_key: 'nodes', ref: 'Script::NodeRemoteValue', list: true}
)
Serialization::Record.define(
  context: 'context',
  url: {wire_key: 'url', primitive: 'string'},
  wait: {wire_key: 'wait', required: false, enum: 'BrowsingContext::READINESS_STATE'}
)
Serialization::Record.define(
  navigation: {wire_key: 'navigation', nullable: true},
  url: {wire_key: 'url', primitive: 'string'}
)
PrintParameters =

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: 'context',
  background: {wire_key: 'background', required: false, primitive: 'boolean'},
  margin: {wire_key: 'margin', required: false, ref: 'BrowsingContext::PrintMarginParameters'},
  orientation: {
    wire_key: 'orientation',
    required: false,
    enum: 'BrowsingContext::PRINT_PARAMETERS_ORIENTATION'
  },
  page: {wire_key: 'page', required: false, ref: 'BrowsingContext::PrintPageParameters'},
  page_ranges: {wire_key: 'pageRanges', required: false, list: true},
  scale: {wire_key: 'scale', required: false, primitive: 'number'},
  shrink_to_fit: {wire_key: 'shrinkToFit', required: false, primitive: 'boolean'}
)
PrintMarginParameters =

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(
  bottom: {wire_key: 'bottom', required: false, primitive: 'number'},
  left: {wire_key: 'left', required: false, primitive: 'number'},
  right: {wire_key: 'right', required: false, primitive: 'number'},
  top: {wire_key: 'top', required: false, primitive: 'number'}
)
PrintPageParameters =

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(
  height: {wire_key: 'height', required: false, primitive: 'number'},
  width: {wire_key: 'width', required: false, primitive: 'number'}
)
PrintResult =

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: {wire_key: 'data', primitive: 'string'})
ReloadParameters =

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: 'context',
  ignore_cache: {wire_key: 'ignoreCache', required: false, primitive: 'boolean'},
  wait: {wire_key: 'wait', required: false, enum: 'BrowsingContext::READINESS_STATE'}
)
SetBypassCSPParameters =

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(
  bypass: {wire_key: 'bypass', nullable: true},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
SetViewportParameters =

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', required: false},
  viewport: {wire_key: 'viewport', required: false, nullable: true, ref: 'BrowsingContext::Viewport'},
  device_pixel_ratio: {wire_key: 'devicePixelRatio', required: false, nullable: true, primitive: 'number'},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
Viewport =

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(width: 'width', height: 'height')
StartScreencastParameters =

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: 'context',
  mime_type: {wire_key: 'mimeType', required: false, primitive: 'string'},
  video: {wire_key: 'video', required: false, ref: 'BrowsingContext::MediaTrackConstraints'},
  audio: {wire_key: 'audio', required: false, primitive: 'boolean'}
)
MediaTrackConstraints =

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(
  width: {wire_key: 'width', required: false},
  height: {wire_key: 'height', required: false},
  frame_rate: {wire_key: 'frameRate', required: false}
)
StartScreencastResult =

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(
  screencast: 'screencast',
  path: {wire_key: 'path', primitive: 'string'}
)
StopScreencastParameters =

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(screencast: 'screencast')
StopScreencastResult =

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(
  path: {wire_key: 'path', primitive: 'string'},
  error: {wire_key: 'error', required: false, primitive: 'string'}
)
TraverseHistoryParameters =

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: 'context', delta: 'delta')
HistoryUpdatedParameters =

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: 'context',
  timestamp: 'timestamp',
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', required: false}
)
DownloadWillBeginParams =

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(
  download: 'download',
  suggested_filename: {wire_key: 'suggestedFilename', primitive: 'string'},
  context: 'context',
  navigation: {wire_key: 'navigation', nullable: true},
  timestamp: 'timestamp',
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', required: false}
)
UserPromptClosedParameters =

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: 'context',
  accepted: {wire_key: 'accepted', primitive: 'boolean'},
  type: {wire_key: 'type', enum: 'BrowsingContext::USER_PROMPT_TYPE'},
  user_context: {wire_key: 'userContext', required: false},
  user_text: {wire_key: 'userText', required: false, primitive: 'string'}
)
UserPromptOpenedParameters =

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: 'context',
  handler: {wire_key: 'handler', enum: 'Session::USER_PROMPT_HANDLER_TYPE'},
  message: {wire_key: 'message', primitive: 'string'},
  type: {wire_key: 'type', enum: 'BrowsingContext::USER_PROMPT_TYPE'},
  user_context: {wire_key: 'userContext', required: false},
  default_value: {wire_key: 'defaultValue', required: false, primitive: 'string'}
)
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.

{
  'browsingContext.contextCreated' => BrowsingContext::Info,
  'browsingContext.contextDestroyed' => BrowsingContext::Info,
  'browsingContext.domContentLoaded' => BrowsingContext::NavigationInfo,
  'browsingContext.downloadEnd' => BrowsingContext::DownloadEndParams,
  'browsingContext.downloadWillBegin' => BrowsingContext::DownloadWillBeginParams,
  'browsingContext.fragmentNavigated' => BrowsingContext::NavigationInfo,
  'browsingContext.historyUpdated' => BrowsingContext::HistoryUpdatedParameters,
  'browsingContext.load' => BrowsingContext::NavigationInfo,
  'browsingContext.navigationAborted' => BrowsingContext::NavigationInfo,
  'browsingContext.navigationCommitted' => BrowsingContext::NavigationInfo,
  'browsingContext.navigationFailed' => BrowsingContext::NavigationInfo,
  'browsingContext.navigationStarted' => BrowsingContext::NavigationInfo,
  'browsingContext.userPromptClosed' => BrowsingContext::UserPromptClosedParameters,
  'browsingContext.userPromptOpened' => BrowsingContext::UserPromptOpenedParameters
}.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

#activate(context:) ⇒ 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.



511
512
513
514
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 511

def activate(context:)
  params = ActivateParameters.new(context: context)
  execute(cmd: 'browsingContext.activate', params: params)
end

#capture_screenshot(context:, origin: Serialization::UNSET, format: Serialization::UNSET, clip: 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.



518
519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 518

def capture_screenshot(
  context:,
  origin: Serialization::UNSET,
  format: Serialization::UNSET,
  clip: Serialization::UNSET
)
  Serialization.validate!('origin', origin, BrowsingContext::CAPTURE_SCREENSHOT_PARAMETERS_ORIGIN)
  params = CaptureScreenshotParameters.new(context: context, origin: origin, format: format, clip: clip)
  execute(
    cmd: 'browsingContext.captureScreenshot',
    params: params,
    result: BrowsingContext::CaptureScreenshotResult
  )
end

#close(context:, prompt_unload: 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.



535
536
537
538
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 535

def close(context:, prompt_unload: Serialization::UNSET)
  params = CloseParameters.new(context: context, prompt_unload: prompt_unload)
  execute(cmd: 'browsingContext.close', params: params)
end

#create(type:, reference_context: Serialization::UNSET, background: Serialization::UNSET, user_context: 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.



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 542

def create(
  type:,
  reference_context: Serialization::UNSET,
  background: Serialization::UNSET,
  user_context: Serialization::UNSET
)
  Serialization.validate!('type', type, BrowsingContext::CREATE_TYPE)
  params = CreateParameters.new(
    type: type,
    reference_context: reference_context,
    background: background,
    user_context: user_context
  )
  execute(cmd: 'browsingContext.create', params: params, result: BrowsingContext::CreateResult)
end

#get_tree(max_depth: Serialization::UNSET, root: 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.



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

def get_tree(max_depth: Serialization::UNSET, root: Serialization::UNSET)
  params = GetTreeParameters.new(max_depth: max_depth, root: root)
  execute(cmd: 'browsingContext.getTree', params: params, result: BrowsingContext::GetTreeResult)
end

#handle_user_prompt(context:, accept: Serialization::UNSET, user_text: 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.



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

def handle_user_prompt(context:, accept: Serialization::UNSET, user_text: Serialization::UNSET)
  params = HandleUserPromptParameters.new(context: context, accept: accept, user_text: user_text)
  execute(cmd: 'browsingContext.handleUserPrompt', params: params)
end

#locate_nodes(context:, locator:, max_node_count: Serialization::UNSET, serialization_options: Serialization::UNSET, start_nodes: 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
579
580
581
582
583
584
585
586
587
588
589
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 574

def locate_nodes(
  context:,
  locator:,
  max_node_count: Serialization::UNSET,
  serialization_options: Serialization::UNSET,
  start_nodes: Serialization::UNSET
)
  params = LocateNodesParameters.new(
    context: context,
    locator: locator,
    max_node_count: max_node_count,
    serialization_options: serialization_options,
    start_nodes: start_nodes
  )
  execute(cmd: 'browsingContext.locateNodes', params: params, result: BrowsingContext::LocateNodesResult)
end

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.



593
594
595
596
597
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 593

def navigate(context:, url:, wait: Serialization::UNSET)
  Serialization.validate!('wait', wait, BrowsingContext::READINESS_STATE)
  params = NavigateParameters.new(context: context, url: url, wait: wait)
  execute(cmd: 'browsingContext.navigate', params: params, result: BrowsingContext::NavigateResult)
end

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.



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 601

def print(
  context:,
  background: Serialization::UNSET,
  margin: Serialization::UNSET,
  orientation: Serialization::UNSET,
  page: Serialization::UNSET,
  page_ranges: Serialization::UNSET,
  scale: Serialization::UNSET,
  shrink_to_fit: Serialization::UNSET
)
  Serialization.validate!('orientation', orientation, BrowsingContext::PRINT_PARAMETERS_ORIENTATION)
  params = PrintParameters.new(
    context: context,
    background: background,
    margin: margin,
    orientation: orientation,
    page: page,
    page_ranges: page_ranges,
    scale: scale,
    shrink_to_fit: shrink_to_fit
  )
  execute(cmd: 'browsingContext.print', params: params, result: BrowsingContext::PrintResult)
end

#reload(context:, ignore_cache: Serialization::UNSET, wait: 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.



627
628
629
630
631
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 627

def reload(context:, ignore_cache: Serialization::UNSET, wait: Serialization::UNSET)
  Serialization.validate!('wait', wait, BrowsingContext::READINESS_STATE)
  params = ReloadParameters.new(context: context, ignore_cache: ignore_cache, wait: wait)
  execute(cmd: 'browsingContext.reload', params: params, result: BrowsingContext::NavigateResult)
end

#set_bypass_csp(bypass:, 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.



635
636
637
638
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 635

def set_bypass_csp(bypass:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET)
  params = SetBypassCSPParameters.new(bypass: bypass, contexts: contexts, user_contexts: user_contexts)
  execute(cmd: 'browsingContext.setBypassCSP', params: params)
end

#set_viewport(context: Serialization::UNSET, viewport: Serialization::UNSET, device_pixel_ratio: 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.



642
643
644
645
646
647
648
649
650
651
652
653
654
655
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 642

def set_viewport(
  context: Serialization::UNSET,
  viewport: Serialization::UNSET,
  device_pixel_ratio: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  params = SetViewportParameters.new(
    context: context,
    viewport: viewport,
    device_pixel_ratio: device_pixel_ratio,
    user_contexts: user_contexts
  )
  execute(cmd: 'browsingContext.setViewport', params: params)
end

#start_screencast(context:, mime_type: Serialization::UNSET, video: Serialization::UNSET, audio: 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.



659
660
661
662
663
664
665
666
667
668
669
670
671
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 659

def start_screencast(
  context:,
  mime_type: Serialization::UNSET,
  video: Serialization::UNSET,
  audio: Serialization::UNSET
)
  params = StartScreencastParameters.new(context: context, mime_type: mime_type, video: video, audio: audio)
  execute(
    cmd: 'browsingContext.startScreencast',
    params: params,
    result: BrowsingContext::StartScreencastResult
  )
end

#stop_screencast(screencast:) ⇒ 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.



675
676
677
678
679
680
681
682
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 675

def stop_screencast(screencast:)
  params = StopScreencastParameters.new(screencast: screencast)
  execute(
    cmd: 'browsingContext.stopScreencast',
    params: params,
    result: BrowsingContext::StopScreencastResult
  )
end

#traverse_history(context:, delta:) ⇒ 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.



686
687
688
689
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 686

def traverse_history(context:, delta:)
  params = TraverseHistoryParameters.new(context: context, delta: delta)
  execute(cmd: 'browsingContext.traverseHistory', params: params)
end