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, Moz

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
BaseInfo =

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: {wire_key: 'clientWindow', primitive: 'string'},
  context: {wire_key: 'context', primitive: 'string'},
  original_opener: {wire_key: 'originalOpener', nullable: true, primitive: 'string'},
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', primitive: 'string'},
  parent: {wire_key: 'parent', required: false, nullable: true, primitive: 'string'}
)
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: {wire_key: 'clientWindow', primitive: 'string'},
  context: {wire_key: 'context', primitive: 'string'},
  original_opener: {wire_key: 'originalOpener', nullable: true, primitive: 'string'},
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', primitive: 'string'},
  parent: {wire_key: 'parent', required: false, nullable: true, primitive: 'string'},
  extensible: 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, primitive: 'integer'}
)
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: {wire_key: 'context', primitive: 'string'},
  navigation: {wire_key: 'navigation', nullable: true, primitive: 'string'},
  timestamp: {wire_key: 'timestamp', primitive: 'integer'},
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', required: false, primitive: 'string'}
)
Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  navigation: {wire_key: 'navigation', nullable: true, primitive: 'string'},
  timestamp: {wire_key: 'timestamp', primitive: 'integer'},
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', required: false, primitive: 'string'}
)
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: {wire_key: 'context', primitive: 'string'})
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: {wire_key: 'context', primitive: 'string'},
  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'},
  image_size: {wire_key: 'imageSize', required: false, ref: 'BrowsingContext::ImageSize'}
)
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: 'number'}
)
ImageSize =

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_width: {wire_key: 'maxWidth', required: false, primitive: 'integer'},
  max_height: {wire_key: 'maxHeight', 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: {wire_key: 'context', primitive: 'string'},
  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, primitive: 'string'},
  background: {wire_key: 'background', required: false, primitive: 'boolean'},
  user_context: {wire_key: 'userContext', required: false, primitive: 'string'}
)
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: {wire_key: 'context', primitive: 'string'},
  user_context: {wire_key: 'userContext', required: false, primitive: 'string'}
)
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, primitive: 'integer'},
  root: {wire_key: 'root', required: false, primitive: 'string'},
  extensible: true
)
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: {wire_key: 'context', primitive: 'string'},
  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: {wire_key: 'context', primitive: 'string'},
  locator: {wire_key: 'locator', ref: 'BrowsingContext::Locator'},
  max_node_count: {wire_key: 'maxNodeCount', required: false, primitive: 'integer'},
  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: {wire_key: 'context', primitive: 'string'},
  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, primitive: 'string'},
  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: {wire_key: 'context', primitive: 'string'},
  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: {wire_key: 'context', primitive: 'string'},
  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, const: 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, primitive: 'string'},
  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: {wire_key: 'width', primitive: 'integer'},
  height: {wire_key: 'height', primitive: 'integer'}
)
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: {wire_key: 'context', primitive: 'string'},
  destination_folder: {wire_key: 'destinationFolder', required: false, primitive: 'string'},
  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, primitive: 'integer'},
  height: {wire_key: 'height', required: false, primitive: 'integer'},
  frame_rate: {wire_key: 'frameRate', required: false, primitive: 'integer'}
)
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: {wire_key: 'screencast', primitive: 'string'},
  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: {wire_key: 'screencast', primitive: 'string'}
)
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: {wire_key: 'context', primitive: 'string'},
  delta: {wire_key: 'delta', primitive: 'integer'}
)
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: {wire_key: 'context', primitive: 'string'},
  timestamp: {wire_key: 'timestamp', primitive: 'integer'},
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', required: false, primitive: 'string'}
)
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: {wire_key: 'download', primitive: 'string'},
  suggested_filename: {wire_key: 'suggestedFilename', primitive: 'string'},
  context: {wire_key: 'context', primitive: 'string'},
  navigation: {wire_key: 'navigation', nullable: true, primitive: 'string'},
  timestamp: {wire_key: 'timestamp', primitive: 'integer'},
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', required: false, primitive: 'string'}
)
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: {wire_key: 'context', primitive: 'string'},
  accepted: {wire_key: 'accepted', primitive: 'boolean'},
  type: {wire_key: 'type', enum: 'BrowsingContext::USER_PROMPT_TYPE'},
  user_context: {wire_key: 'userContext', required: false, primitive: 'string'},
  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: {wire_key: 'context', primitive: 'string'},
  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, primitive: 'string'},
  default_value: {wire_key: 'defaultValue', required: false, primitive: 'string'}
)
ContextCreatedParameters =

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: {wire_key: 'clientWindow', primitive: 'string'},
  context: {wire_key: 'context', primitive: 'string'},
  original_opener: {wire_key: 'originalOpener', nullable: true, primitive: 'string'},
  url: {wire_key: 'url', primitive: 'string'},
  user_context: {wire_key: 'userContext', primitive: 'string'},
  parent: {wire_key: 'parent', required: false, nullable: true, primitive: 'string'},
  has_planned_navigation: {wire_key: 'hasPlannedNavigation', required: false, primitive: 'boolean'}
)
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::ContextCreatedParameters,
  '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

#accessibility_locator ⇒ 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.



621
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 621

def accessibility_locator(**) = AccessibilityLocator.new(**)

#accessibility_locator_value ⇒ 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
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 635

def accessibility_locator_value(**) = AccessibilityLocator::Value.new(**)

#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.



642
643
644
645
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 642

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

#box_clip_rectangle ⇒ 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.



630
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 630

def box_clip_rectangle(**) = BoxClipRectangle.new(**)

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



650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 650

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

#clip_rectangle ⇒ 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.



628
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 628

def clip_rectangle = ClipRectangle

#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.



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

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

#context_locator ⇒ 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.



623
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 623

def context_locator(**) = ContextLocator.new(**)

#context_locator_value ⇒ 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.



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

def context_locator_value(**) = ContextLocator::Value.new(**)

#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.



683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 683

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

#css_locator ⇒ 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.



622
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 622

def css_locator(**) = CssLocator.new(**)

#element_clip_rectangle ⇒ 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
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 629

def element_clip_rectangle(**) = ElementClipRectangle.new(**)

#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.



702
703
704
705
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 702

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.



710
711
712
713
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 710

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

#image_format ⇒ 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.



626
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 626

def image_format(**) = ImageFormat.new(**)

#image_size ⇒ 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
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 627

def image_size(**) = ImageSize.new(**)

#inner_text_locator ⇒ 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.



624
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 624

def inner_text_locator(**) = InnerTextLocator.new(**)

#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.



718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 718

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

#locator ⇒ 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.



620
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 620

def locator = Locator

#media_track_constraints ⇒ 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.



634
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 634

def media_track_constraints(**) = MediaTrackConstraints.new(**)

#moz ⇒ 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.



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

def moz = Moz.new(connection)

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.



738
739
740
741
742
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 738

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.



747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 747

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

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.



631
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 631

def print_margin_parameters(**) = PrintMarginParameters.new(**)

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.



632
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 632

def print_page_parameters(**) = PrintPageParameters.new(**)

#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.



774
775
776
777
778
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 774

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.



783
784
785
786
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 783

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.



791
792
793
794
795
796
797
798
799
800
801
802
803
804
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 791

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:, destination_folder: Serialization::UNSET, 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.



809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 809

def start_screencast(
  context:,
  destination_folder: Serialization::UNSET,
  mime_type: Serialization::UNSET,
  video: Serialization::UNSET,
  audio: Serialization::UNSET
)
  params = StartScreencastParameters.new(
    context: context,
    destination_folder: destination_folder,
    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.



833
834
835
836
837
838
839
840
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 833

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.



845
846
847
848
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 845

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

#viewport ⇒ 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.



633
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 633

def viewport(**) = Viewport.new(**)

#x_path_locator ⇒ 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.



625
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 625

def x_path_locator(**) = XPathLocator.new(**)