Class: Selenium::WebDriver::BiDi::Protocol::Script Private
- Defined in:
- lib/selenium/webdriver/bidi/protocol/script.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: EvaluateResult, LocalValue, PrimitiveProtocolValue, RealmInfo, RemoteReference, RemoteValue, Target
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.
{ message: 'script.message', realm_created: 'script.realmCreated', realm_destroyed: 'script.realmDestroyed' }.freeze
- SPECIAL_NUMBER =
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.
{ na_n: 'NaN', neg0: '-0', infinity: 'Infinity', neg_infinity: '-Infinity' }.freeze
- REALM_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.
{ window: 'window', dedicated_worker: 'dedicated-worker', shared_worker: 'shared-worker', service_worker: 'service-worker', worker: 'worker', paint_worklet: 'paint-worklet', audio_worklet: 'audio-worklet', worklet: 'worklet' }.freeze
- RESULT_OWNERSHIP =
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.
{ root: 'root', none: 'none' }.freeze
- NODE_PROPERTIES_MODE =
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.
{ open: 'open', closed: 'closed' }.freeze
- SERIALIZATION_OPTIONS_INCLUDE_SHADOW_TREE =
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', open: 'open', all: 'all' }.freeze
- ChannelValue =
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: 'channel'}, value: {wire_key: 'value', ref: 'Script::ChannelProperties'} )
- ChannelProperties =
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( channel: 'channel', serialization_options: { wire_key: 'serializationOptions', required: false, ref: 'Script::SerializationOptions' }, ownership: {wire_key: 'ownership', required: false, enum: 'Script::RESULT_OWNERSHIP'} )
- EvaluateResultSuccess =
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: 'success'}, result: {wire_key: 'result', ref: 'Script::RemoteValue'}, realm: 'realm' )
- EvaluateResultException =
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: 'exception'}, exception_details: {wire_key: 'exceptionDetails', ref: 'Script::ExceptionDetails'}, realm: 'realm' )
- ExceptionDetails =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( column_number: 'columnNumber', exception: {wire_key: 'exception', ref: 'Script::RemoteValue'}, line_number: 'lineNumber', stack_trace: {wire_key: 'stackTrace', ref: 'Script::StackTrace'}, text: {wire_key: 'text', primitive: 'string'} )
- ArrayLocalValue =
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: 'array'}, value: {wire_key: 'value', ref: 'Script::LocalValue', list: true} )
- DateLocalValue =
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: 'date'}, value: {wire_key: 'value', primitive: 'string'} )
- MapLocalValue =
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: 'map'}, value: {wire_key: 'value', ref: 'Script::LocalValue', list: true} )
- ObjectLocalValue =
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: 'object'}, value: {wire_key: 'value', ref: 'Script::LocalValue', list: true} )
- RegExpValue =
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( pattern: {wire_key: 'pattern', primitive: 'string'}, flags: {wire_key: 'flags', required: false, primitive: 'string'} )
- RegExpLocalValue =
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: 'regexp'}, value: {wire_key: 'value', ref: 'Script::RegExpValue'} )
- SetLocalValue =
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: 'set'}, value: {wire_key: 'value', ref: 'Script::LocalValue', list: true} )
- UndefinedValue =
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: 'undefined'})
- NullValue =
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: 'null'})
- StringValue =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( type: {fixed: 'string'}, value: {wire_key: 'value', primitive: 'string'} )
- NumberValue =
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: 'number'}, value: 'value')
- BooleanValue =
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: 'boolean'}, value: {wire_key: 'value', primitive: 'boolean'} )
- BigIntValue =
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: 'bigint'}, value: {wire_key: 'value', primitive: 'string'} )
- BaseRealmInfo =
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( realm: 'realm', origin: {wire_key: 'origin', primitive: 'string'} )
- WindowRealmInfo =
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: 'window'}, realm: 'realm', origin: {wire_key: 'origin', primitive: 'string'}, context: 'context', user_context: {wire_key: 'userContext', required: false}, sandbox: {wire_key: 'sandbox', required: false, primitive: 'string'} )
- DedicatedWorkerRealmInfo =
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: 'dedicated-worker'}, realm: 'realm', origin: {wire_key: 'origin', primitive: 'string'}, owners: {wire_key: 'owners', list: true} )
Serialization::Record.define( type: {fixed: 'shared-worker'}, realm: 'realm', origin: {wire_key: 'origin', primitive: 'string'} )
- ServiceWorkerRealmInfo =
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: 'service-worker'}, realm: 'realm', origin: {wire_key: 'origin', primitive: 'string'} )
- WorkerRealmInfo =
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: 'worker'}, realm: 'realm', origin: {wire_key: 'origin', primitive: 'string'} )
- PaintWorkletRealmInfo =
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: 'paint-worklet'}, realm: 'realm', origin: {wire_key: 'origin', primitive: 'string'} )
- AudioWorkletRealmInfo =
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: 'audio-worklet'}, realm: 'realm', origin: {wire_key: 'origin', primitive: 'string'} )
- WorkletRealmInfo =
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: 'worklet'}, realm: 'realm', origin: {wire_key: 'origin', primitive: 'string'} )
Serialization::Record.define( shared_id: 'sharedId', handle: {wire_key: 'handle', required: false}, extensible: true )
- RemoteObjectReference =
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( handle: 'handle', shared_id: {wire_key: 'sharedId', required: false}, extensible: true )
- SymbolRemoteValue =
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: 'symbol'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- ArrayRemoteValue =
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: 'array'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false}, value: {wire_key: 'value', required: false, ref: 'Script::RemoteValue', list: true} )
- ObjectRemoteValue =
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: 'object'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false}, value: {wire_key: 'value', required: false, ref: 'Script::RemoteValue', list: true} )
- FunctionRemoteValue =
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: 'function'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- RegExpRemoteValue =
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: 'regexp'}, value: {wire_key: 'value', ref: 'Script::RegExpValue'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- DateRemoteValue =
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: 'date'}, value: {wire_key: 'value', primitive: 'string'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- MapRemoteValue =
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: 'map'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false}, value: {wire_key: 'value', required: false, ref: 'Script::RemoteValue', list: true} )
- SetRemoteValue =
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: 'set'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false}, value: {wire_key: 'value', required: false, ref: 'Script::RemoteValue', list: true} )
- WeakMapRemoteValue =
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: 'weakmap'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- WeakSetRemoteValue =
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: 'weakset'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- GeneratorRemoteValue =
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: 'generator'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- ErrorRemoteValue =
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: 'error'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- ProxyRemoteValue =
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: 'proxy'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- PromiseRemoteValue =
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: 'promise'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- TypedArrayRemoteValue =
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: 'typedarray'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- ArrayBufferRemoteValue =
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: 'arraybuffer'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- NodeListRemoteValue =
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: 'nodelist'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false}, value: {wire_key: 'value', required: false, ref: 'Script::RemoteValue', list: true} )
- HTMLCollectionRemoteValue =
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: 'htmlcollection'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false}, value: {wire_key: 'value', required: false, ref: 'Script::RemoteValue', list: true} )
- NodeRemoteValue =
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: 'node'}, shared_id: {wire_key: 'sharedId', required: false}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false}, value: {wire_key: 'value', required: false, ref: 'Script::NodeProperties'} )
- NodeProperties =
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( node_type: 'nodeType', child_node_count: 'childNodeCount', attributes: {wire_key: 'attributes', required: false}, children: {wire_key: 'children', required: false, ref: 'Script::NodeRemoteValue', list: true}, local_name: {wire_key: 'localName', required: false, primitive: 'string'}, mode: {wire_key: 'mode', required: false, enum: 'Script::NODE_PROPERTIES_MODE'}, namespace_uri: {wire_key: 'namespaceURI', required: false, primitive: 'string'}, node_value: {wire_key: 'nodeValue', required: false, primitive: 'string'}, shadow_root: {wire_key: 'shadowRoot', required: false, nullable: true, ref: 'Script::NodeRemoteValue'} )
- WindowProxyRemoteValue =
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: 'window'}, value: {wire_key: 'value', ref: 'Script::WindowProxyProperties'}, handle: {wire_key: 'handle', required: false}, internal_id: {wire_key: 'internalId', required: false} )
- WindowProxyProperties =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define(context: 'context')
- SerializationOptions =
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_dom_depth: {wire_key: 'maxDomDepth', required: false, nullable: true}, max_object_depth: {wire_key: 'maxObjectDepth', required: false, nullable: true}, include_shadow_tree: { wire_key: 'includeShadowTree', required: false, enum: 'Script::SERIALIZATION_OPTIONS_INCLUDE_SHADOW_TREE' } )
- StackFrame =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( column_number: 'columnNumber', function_name: {wire_key: 'functionName', primitive: 'string'}, line_number: 'lineNumber', url: {wire_key: 'url', primitive: 'string'} )
- StackTrace =
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( call_frames: {wire_key: 'callFrames', ref: 'Script::StackFrame', list: true} )
- Source =
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( realm: 'realm', context: {wire_key: 'context', required: false}, user_context: {wire_key: 'userContext', required: false} )
- RealmTarget =
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(realm: 'realm')
- ContextTarget =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( context: 'context', sandbox: {wire_key: 'sandbox', required: false, primitive: 'string'} )
- AddPreloadScriptParameters =
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( function_declaration: {wire_key: 'functionDeclaration', primitive: 'string'}, arguments: {wire_key: 'arguments', required: false, ref: 'Script::ChannelValue', list: true}, contexts: {wire_key: 'contexts', required: false, list: true}, user_contexts: {wire_key: 'userContexts', required: false, list: true}, sandbox: {wire_key: 'sandbox', required: false, primitive: 'string'} )
- AddPreloadScriptResult =
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(script: 'script')
- DisownParameters =
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( handles: {wire_key: 'handles', list: true}, target: {wire_key: 'target', ref: 'Script::Target'} )
- CallFunctionParameters =
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( function_declaration: {wire_key: 'functionDeclaration', primitive: 'string'}, await_promise: {wire_key: 'awaitPromise', primitive: 'boolean'}, target: {wire_key: 'target', ref: 'Script::Target'}, arguments: {wire_key: 'arguments', required: false, ref: 'Script::LocalValue', list: true}, result_ownership: {wire_key: 'resultOwnership', required: false, enum: 'Script::RESULT_OWNERSHIP'}, serialization_options: { wire_key: 'serializationOptions', required: false, ref: 'Script::SerializationOptions' }, this: {wire_key: 'this', required: false, ref: 'Script::LocalValue'}, user_activation: {wire_key: 'userActivation', required: false, primitive: 'boolean'} )
- EvaluateParameters =
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( expression: {wire_key: 'expression', primitive: 'string'}, target: {wire_key: 'target', ref: 'Script::Target'}, await_promise: {wire_key: 'awaitPromise', primitive: 'boolean'}, result_ownership: {wire_key: 'resultOwnership', required: false, enum: 'Script::RESULT_OWNERSHIP'}, serialization_options: { wire_key: 'serializationOptions', required: false, ref: 'Script::SerializationOptions' }, user_activation: {wire_key: 'userActivation', required: false, primitive: 'boolean'} )
- GetRealmsParameters =
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}, type: {wire_key: 'type', required: false, enum: 'Script::REALM_TYPE'} )
- GetRealmsResult =
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( realms: {wire_key: 'realms', ref: 'Script::RealmInfo', list: true} )
- RemovePreloadScriptParameters =
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(script: 'script')
- MessageParameters =
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( channel: 'channel', data: {wire_key: 'data', ref: 'Script::RemoteValue'}, source: {wire_key: 'source', ref: 'Script::Source'} )
- RealmDestroyedParameters =
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(realm: 'realm')
- 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.
{ 'script.message' => Script::MessageParameters, 'script.realmCreated' => Script::RealmInfo, 'script.realmDestroyed' => Script::RealmDestroyedParameters }.freeze
Instance Method Summary collapse
- #add_preload_script(function_declaration:, arguments: Serialization::UNSET, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET, sandbox: Serialization::UNSET) ⇒ Object private
- #call_function(function_declaration:, await_promise:, target:, arguments: Serialization::UNSET, result_ownership: Serialization::UNSET, serialization_options: Serialization::UNSET, this: Serialization::UNSET, user_activation: Serialization::UNSET) ⇒ Object private
- #disown(handles:, target:) ⇒ Object private
- #evaluate(expression:, target:, await_promise:, result_ownership: Serialization::UNSET, serialization_options: Serialization::UNSET, user_activation: Serialization::UNSET) ⇒ Object private
- #get_realms(context: Serialization::UNSET, type: Serialization::UNSET) ⇒ Object private
- #remove_preload_script(script:) ⇒ Object private
Methods inherited from Domain
Constructor Details
This class inherits a constructor from Selenium::WebDriver::BiDi::Protocol::Domain
Instance Method Details
#add_preload_script(function_declaration:, arguments: Serialization::UNSET, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET, sandbox: 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.
784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 |
# File 'lib/selenium/webdriver/bidi/protocol/script.rb', line 784 def add_preload_script( function_declaration:, arguments: Serialization::UNSET, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET, sandbox: Serialization::UNSET ) params = AddPreloadScriptParameters.new( function_declaration: function_declaration, arguments: arguments, contexts: contexts, user_contexts: user_contexts, sandbox: sandbox ) execute(cmd: 'script.addPreloadScript', params: params, result: Script::AddPreloadScriptResult) end |
#call_function(function_declaration:, await_promise:, target:, arguments: Serialization::UNSET, result_ownership: Serialization::UNSET, serialization_options: Serialization::UNSET, this: Serialization::UNSET, user_activation: 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.
803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 |
# File 'lib/selenium/webdriver/bidi/protocol/script.rb', line 803 def call_function( function_declaration:, await_promise:, target:, arguments: Serialization::UNSET, result_ownership: Serialization::UNSET, serialization_options: Serialization::UNSET, this: Serialization::UNSET, user_activation: Serialization::UNSET ) Serialization.validate!('resultOwnership', result_ownership, Script::RESULT_OWNERSHIP) params = CallFunctionParameters.new( function_declaration: function_declaration, await_promise: await_promise, target: target, arguments: arguments, result_ownership: result_ownership, serialization_options: , this: this, user_activation: user_activation ) execute(cmd: 'script.callFunction', params: params, result: Script::EvaluateResult) end |
#disown(handles:, target:) ⇒ 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.
829 830 831 832 |
# File 'lib/selenium/webdriver/bidi/protocol/script.rb', line 829 def disown(handles:, target:) params = DisownParameters.new(handles: handles, target: target) execute(cmd: 'script.disown', params: params) end |
#evaluate(expression:, target:, await_promise:, result_ownership: Serialization::UNSET, serialization_options: Serialization::UNSET, user_activation: 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.
836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 |
# File 'lib/selenium/webdriver/bidi/protocol/script.rb', line 836 def evaluate( expression:, target:, await_promise:, result_ownership: Serialization::UNSET, serialization_options: Serialization::UNSET, user_activation: Serialization::UNSET ) Serialization.validate!('resultOwnership', result_ownership, Script::RESULT_OWNERSHIP) params = EvaluateParameters.new( expression: expression, target: target, await_promise: await_promise, result_ownership: result_ownership, serialization_options: , user_activation: user_activation ) execute(cmd: 'script.evaluate', params: params, result: Script::EvaluateResult) end |
#get_realms(context: Serialization::UNSET, type: 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.
858 859 860 861 862 |
# File 'lib/selenium/webdriver/bidi/protocol/script.rb', line 858 def get_realms(context: Serialization::UNSET, type: Serialization::UNSET) Serialization.validate!('type', type, Script::REALM_TYPE) params = GetRealmsParameters.new(context: context, type: type) execute(cmd: 'script.getRealms', params: params, result: Script::GetRealmsResult) end |
#remove_preload_script(script:) ⇒ 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.
866 867 868 869 |
# File 'lib/selenium/webdriver/bidi/protocol/script.rb', line 866 def remove_preload_script(script:) params = RemovePreloadScriptParameters.new(script: script) execute(cmd: 'script.removePreloadScript', params: params) end |