Class: Selenium::WebDriver::BiDi::Protocol::BrowsingContext Private
- 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
- PRINT_PARAMETERS_ORIENTATION =
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.
{ 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'} )
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'} )
- 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
- #accessibility_locator ⇒ Object private
- #accessibility_locator_value ⇒ Object private
- #activate(context:) ⇒ Object private
- #box_clip_rectangle ⇒ Object private
- #capture_screenshot(context:, origin: Serialization::UNSET, format: Serialization::UNSET, clip: Serialization::UNSET, image_size: Serialization::UNSET) ⇒ Object private
- #clip_rectangle ⇒ Object private
- #close(context:, prompt_unload: Serialization::UNSET) ⇒ Object private
- #context_locator ⇒ Object private
- #context_locator_value ⇒ Object private
- #create(type:, reference_context: Serialization::UNSET, background: Serialization::UNSET, user_context: Serialization::UNSET) ⇒ Object private
- #css_locator ⇒ Object private
- #element_clip_rectangle ⇒ Object private
- #get_tree(max_depth: Serialization::UNSET, root: Serialization::UNSET) ⇒ Object private
- #handle_user_prompt(context:, accept: Serialization::UNSET, user_text: Serialization::UNSET) ⇒ Object private
- #image_format ⇒ Object private
- #image_size ⇒ Object private
- #inner_text_locator ⇒ Object private
- #locate_nodes(context:, locator:, max_node_count: Serialization::UNSET, serialization_options: Serialization::UNSET, start_nodes: Serialization::UNSET) ⇒ Object private
- #locator ⇒ Object private
- #media_track_constraints ⇒ Object private
- #navigate(context:, url:, wait: Serialization::UNSET) ⇒ Object private
- #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) ⇒ Object private
- #print_margin_parameters ⇒ Object private
- #print_page_parameters ⇒ Object private
- #reload(context:, ignore_cache: Serialization::UNSET, wait: Serialization::UNSET) ⇒ Object private
- #set_bypass_csp(bypass:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET) ⇒ Object private
- #set_viewport(context: Serialization::UNSET, viewport: Serialization::UNSET, device_pixel_ratio: Serialization::UNSET, user_contexts: Serialization::UNSET) ⇒ Object private
- #start_screencast(context:, mime_type: Serialization::UNSET, video: Serialization::UNSET, audio: Serialization::UNSET) ⇒ Object private
- #stop_screencast(screencast:) ⇒ Object private
- #traverse_history(context:, delta:) ⇒ Object private
- #viewport ⇒ Object private
- #x_path_locator ⇒ Object private
Methods inherited from Domain
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.
591 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 591 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.
605 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 605 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.
611 612 613 614 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 611 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.
600 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 600 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.
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 619 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.
598 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 598 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.
644 645 646 647 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 644 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.
593 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 593 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.
606 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 606 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.
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 652 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.
592 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 592 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.
599 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 599 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.
671 672 673 674 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 671 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.
679 680 681 682 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 679 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.
596 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 596 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.
597 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 597 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.
594 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 594 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.
687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 687 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: , 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.
590 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 590 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.
604 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 604 def media_track_constraints(**) = MediaTrackConstraints.new(**) |
#navigate(context:, url:, 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.
707 708 709 710 711 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 707 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 |
#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) ⇒ 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.
716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 716 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 |
#print_margin_parameters ⇒ 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 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 601 def print_margin_parameters(**) = PrintMarginParameters.new(**) |
#print_page_parameters ⇒ 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.
602 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 602 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.
743 744 745 746 747 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 743 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.
752 753 754 755 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 752 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.
760 761 762 763 764 765 766 767 768 769 770 771 772 773 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 760 def ( context: Serialization::UNSET, viewport: Serialization::UNSET, device_pixel_ratio: Serialization::UNSET, user_contexts: Serialization::UNSET ) params = SetViewportParameters.new( context: context, 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.
778 779 780 781 782 783 784 785 786 787 788 789 790 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 778 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.
795 796 797 798 799 800 801 802 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 795 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.
807 808 809 810 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 807 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.
603 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 603 def (**) = 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.
595 |
# File 'lib/selenium/webdriver/bidi/protocol/browsing_context.rb', line 595 def x_path_locator(**) = XPathLocator.new(**) |