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: {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'}
)
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'}
)
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'}
)
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'}
)
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'},
  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'}
)
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

#accessibility_locatorObject

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

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

#accessibility_locator_valueObject

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.



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

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.



601
602
603
604
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 601

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

#box_clip_rectangleObject

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.



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

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

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



609
610
611
612
613
614
615
616
617
618
619
620
621
622
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 609

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

#clip_rectangleObject

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.



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

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.



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

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

#context_locatorObject

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.



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

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

#context_locator_valueObject

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.



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

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.



635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 635

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_locatorObject

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.



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

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

#element_clip_rectangleObject

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.



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

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.



654
655
656
657
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 654

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.



662
663
664
665
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 662

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_formatObject

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.



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

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

#inner_text_locatorObject

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.



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

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.



670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 670

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

#locatorObject

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.



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

def locator = Locator

#media_track_constraintsObject

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.



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

def media_track_constraints(**) = MediaTrackConstraints.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.



690
691
692
693
694
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 690

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.



699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 699

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.



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

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.



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

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.



726
727
728
729
730
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 726

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.



735
736
737
738
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 735

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.



743
744
745
746
747
748
749
750
751
752
753
754
755
756
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 743

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.



761
762
763
764
765
766
767
768
769
770
771
772
773
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 761

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.



778
779
780
781
782
783
784
785
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 778

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.



790
791
792
793
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 790

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

#viewportObject

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

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

#x_path_locatorObject

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.



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

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