Class: Selenium::WebDriver::BiDi::Protocol::Input Private

Inherits:
Domain
  • Object
show all
Defined in:
lib/selenium/webdriver/bidi/protocol/input.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: KeySourceAction, Origin, PointerSourceAction, SourceActions, WheelSourceAction

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.

{
  file_dialog_opened: 'input.fileDialogOpened'
}.freeze
POINTER_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.

{
  mouse: 'mouse',
  pen: 'pen',
  touch: 'touch'
}.freeze
ElementOrigin =

This constant is 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'}
)
PerformActionsParameters =

This constant is 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'},
  actions: {wire_key: 'actions', ref: 'Input::SourceActions', list: true}
)
NoneSourceActions =

This constant is 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: 'none'},
  id: {wire_key: 'id', primitive: 'string'},
  actions: {wire_key: 'actions', ref: 'Input::PauseAction', list: true}
)
KeySourceActions =

This constant is 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: 'key'},
  id: {wire_key: 'id', primitive: 'string'},
  actions: {wire_key: 'actions', ref: 'Input::KeySourceAction', list: true}
)
PointerSourceActions =

This constant is 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: 'pointer'},
  id: {wire_key: 'id', primitive: 'string'},
  parameters: {wire_key: 'parameters', required: false, ref: 'Input::PointerParameters'},
  actions: {wire_key: 'actions', ref: 'Input::PointerSourceAction', list: true}
)
PointerParameters =

This constant is 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(
  pointer_type: {wire_key: 'pointerType', required: false, enum: 'Input::POINTER_TYPE'}
)
WheelSourceActions =

This constant is 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: 'wheel'},
  id: {wire_key: 'id', primitive: 'string'},
  actions: {wire_key: 'actions', ref: 'Input::WheelSourceAction', list: true}
)
PauseAction =

This constant is 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: 'pause'},
  duration: {wire_key: 'duration', required: false, primitive: 'integer', min: 0, max: 9_007_199_254_740_991}
)
KeyDownAction =

This constant is 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: 'keyDown'},
  value: {wire_key: 'value', primitive: 'string'}
)
KeyUpAction =

This constant is 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: 'keyUp'},
  value: {wire_key: 'value', primitive: 'string'}
)
PointerUpAction =

This constant is 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: 'pointerUp'},
  button: {wire_key: 'button', primitive: 'integer', min: 0, max: 9_007_199_254_740_991}
)
PointerDownAction =

This constant is 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: 'pointerDown'},
  button: {wire_key: 'button', primitive: 'integer', min: 0, max: 9_007_199_254_740_991},
  width: {wire_key: 'width', required: false, primitive: 'integer', min: 0, max: 9_007_199_254_740_991},
  height: {wire_key: 'height', required: false, primitive: 'integer', min: 0, max: 9_007_199_254_740_991},
  pressure: {wire_key: 'pressure', required: false, primitive: 'number', min: 0, max: 1},
  tangential_pressure: {
    wire_key: 'tangentialPressure',
    required: false,
    primitive: 'number',
    min: -1,
    max: 1
  },
  twist: {wire_key: 'twist', required: false, primitive: 'integer', min: 0, max: 359},
  altitude_angle: {
    wire_key: 'altitudeAngle',
    required: false,
    primitive: 'number',
    min: 0,
    max: 1.5707963267948966
  },
  azimuth_angle: {
    wire_key: 'azimuthAngle',
    required: false,
    primitive: 'number',
    min: 0,
    max: 6.283185307179586
  }
)
PointerMoveAction =

This constant is 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: 'pointerMove'},
  x: {wire_key: 'x', primitive: 'number'},
  y: {wire_key: 'y', primitive: 'number'},
  duration: {wire_key: 'duration', required: false, primitive: 'integer', min: 0, max: 9_007_199_254_740_991},
  origin: {wire_key: 'origin', required: false, ref: 'Input::Origin'},
  width: {wire_key: 'width', required: false, primitive: 'integer', min: 0, max: 9_007_199_254_740_991},
  height: {wire_key: 'height', required: false, primitive: 'integer', min: 0, max: 9_007_199_254_740_991},
  pressure: {wire_key: 'pressure', required: false, primitive: 'number', min: 0, max: 1},
  tangential_pressure: {
    wire_key: 'tangentialPressure',
    required: false,
    primitive: 'number',
    min: -1,
    max: 1
  },
  twist: {wire_key: 'twist', required: false, primitive: 'integer', min: 0, max: 359},
  altitude_angle: {
    wire_key: 'altitudeAngle',
    required: false,
    primitive: 'number',
    min: 0,
    max: 1.5707963267948966
  },
  azimuth_angle: {
    wire_key: 'azimuthAngle',
    required: false,
    primitive: 'number',
    min: 0,
    max: 6.283185307179586
  }
)
WheelScrollAction =

This constant is 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: 'scroll'},
  x: {wire_key: 'x', primitive: 'integer', min: -9_007_199_254_740_991, max: 9_007_199_254_740_991},
  y: {wire_key: 'y', primitive: 'integer', min: -9_007_199_254_740_991, max: 9_007_199_254_740_991},
  delta_x: {
    wire_key: 'deltaX',
    primitive: 'integer',
    min: -9_007_199_254_740_991,
    max: 9_007_199_254_740_991
  },
  delta_y: {
    wire_key: 'deltaY',
    primitive: 'integer',
    min: -9_007_199_254_740_991,
    max: 9_007_199_254_740_991
  },
  duration: {wire_key: 'duration', required: false, primitive: 'integer', min: 0, max: 9_007_199_254_740_991},
  origin: {wire_key: 'origin', required: false, ref: 'Input::Origin'}
)
PointerCommonProperties =

This constant is 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', min: 0, max: 9_007_199_254_740_991},
  height: {wire_key: 'height', required: false, primitive: 'integer', min: 0, max: 9_007_199_254_740_991},
  pressure: {wire_key: 'pressure', required: false, primitive: 'number', min: 0, max: 1},
  tangential_pressure: {
    wire_key: 'tangentialPressure',
    required: false,
    primitive: 'number',
    min: -1,
    max: 1
  },
  twist: {wire_key: 'twist', required: false, primitive: 'integer', min: 0, max: 359},
  altitude_angle: {
    wire_key: 'altitudeAngle',
    required: false,
    primitive: 'number',
    min: 0,
    max: 1.5707963267948966
  },
  azimuth_angle: {
    wire_key: 'azimuthAngle',
    required: false,
    primitive: 'number',
    min: 0,
    max: 6.283185307179586
  }
)
ReleaseActionsParameters =

This constant is 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'})
SetFilesParameters =

This constant is 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'},
  element: {wire_key: 'element', ref: 'Script::SharedReference'},
  files: {wire_key: 'files', list: true, primitive: 'string'}
)
FileDialogInfo =

This constant is 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'},
  element: {wire_key: 'element', required: false, ref: 'Script::SharedReference'},
  multiple: {wire_key: 'multiple', primitive: 'boolean'}
)
EVENT_TYPES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  'input.fileDialogOpened' => Input::FileDialogInfo
}.freeze

Instance Method Summary collapse

Methods inherited from Domain

#initialize, #remove_listener

Constructor Details

This class inherits a constructor from Selenium::WebDriver::BiDi::Protocol::Domain

Instance Method Details

#add_file_dialog_opened_listener(&block) ⇒ 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.



418
419
420
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 418

def add_file_dialog_opened_listener(&block)
  add_listener('input.fileDialogOpened', &block)
end

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



373
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 373

def element_origin(**) = ElementOrigin.new(**)

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



384
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 384

def key_down_action(**) = KeyDownAction.new(**)

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



377
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 377

def key_source_action = KeySourceAction

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



376
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 376

def key_source_actions(**) = KeySourceActions.new(**)

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



385
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 385

def key_up_action(**) = KeyUpAction.new(**)

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



375
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 375

def none_source_actions(**) = NoneSourceActions.new(**)

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



383
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 383

def pause_action(**) = PauseAction.new(**)

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



394
395
396
397
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 394

def perform_actions(context:, actions:)
  params = PerformActionsParameters.new(context: context, actions: actions)
  execute(cmd: 'input.performActions', params: params)
end

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



387
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 387

def pointer_down_action(**) = PointerDownAction.new(**)

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



388
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 388

def pointer_move_action(**) = PointerMoveAction.new(**)

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



379
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 379

def pointer_parameters(**) = PointerParameters.new(**)

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



380
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 380

def pointer_source_action = PointerSourceAction

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



378
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 378

def pointer_source_actions(**) = PointerSourceActions.new(**)

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



386
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 386

def pointer_up_action(**) = PointerUpAction.new(**)

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



402
403
404
405
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 402

def release_actions(context:)
  params = ReleaseActionsParameters.new(context: context)
  execute(cmd: 'input.releaseActions', params: params)
end

#set_files(context:, element:, files:) ⇒ 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.



410
411
412
413
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 410

def set_files(context:, element:, files:)
  params = SetFilesParameters.new(context: context, element: element, files: files)
  execute(cmd: 'input.setFiles', params: params)
end

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



374
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 374

def source_actions = SourceActions

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



389
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 389

def wheel_scroll_action(**) = WheelScrollAction.new(**)

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



382
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 382

def wheel_source_action = WheelSourceAction

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



381
# File 'lib/selenium/webdriver/bidi/protocol/input.rb', line 381

def wheel_source_actions(**) = WheelSourceActions.new(**)