Class: Selenium::WebDriver::BiDi::Protocol::Emulation Private

Inherits:
Domain
  • Object
show all
Defined in:
lib/selenium/webdriver/bidi/protocol/emulation.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: SetGeolocationOverrideParameters

Constant Summary collapse

FORCED_COLORS_MODE_THEME =

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.

{
  light: 'light',
  dark: 'dark'
}.freeze
SCREEN_ORIENTATION_NATURAL =

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

{
  portrait_primary: 'portrait-primary',
  portrait_secondary: 'portrait-secondary',
  landscape_primary: 'landscape-primary',
  landscape_secondary: 'landscape-secondary'
}.freeze
SET_SCROLLBAR_TYPE_OVERRIDE_PARAMETERS_SCROLLBAR_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.

{
  classic: 'classic',
  overlay: 'overlay'
}.freeze
SetForcedColorsModeThemeOverrideParameters =

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(
  theme: {wire_key: 'theme', nullable: true, enum: 'Emulation::FORCED_COLORS_MODE_THEME'},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
GeolocationCoordinates =

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(
  latitude: {wire_key: 'latitude', primitive: 'number'},
  longitude: {wire_key: 'longitude', primitive: 'number'},
  accuracy: {wire_key: 'accuracy', required: false, primitive: 'number'},
  altitude: {wire_key: 'altitude', required: false, nullable: true, primitive: 'number'},
  altitude_accuracy: {wire_key: 'altitudeAccuracy', required: false, nullable: true, primitive: 'number'},
  heading: {wire_key: 'heading', required: false, nullable: true, primitive: 'number'},
  speed: {wire_key: 'speed', required: false, nullable: true, primitive: 'number'}
)
GeolocationPositionError =

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: 'positionUnavailable'})
SetLocaleOverrideParameters =

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(
  locale: {wire_key: 'locale', nullable: true, primitive: 'string'},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
SetMediaFeaturesOverrideParameters =

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(
  features: {wire_key: 'features', nullable: true, ref: 'Emulation::MediaFeature', list: true},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
MediaFeature =

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(
  name: {wire_key: 'name', primitive: 'string'},
  value: {wire_key: 'value', primitive: 'string'}
)
SetNetworkConditionsParameters =

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(
  network_conditions: {
    wire_key: 'networkConditions',
    nullable: true,
    ref: 'Emulation::NetworkConditionsOffline'
  },
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
NetworkConditionsOffline =

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: 'offline'})
ScreenArea =

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'}
)
SetScreenSettingsOverrideParameters =

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(
  screen_area: {wire_key: 'screenArea', nullable: true, ref: 'Emulation::ScreenArea'},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
ScreenOrientation =

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(
  natural: {wire_key: 'natural', enum: 'Emulation::SCREEN_ORIENTATION_NATURAL'},
  type: {wire_key: 'type', enum: 'Emulation::SCREEN_ORIENTATION_TYPE'}
)
SetScreenOrientationOverrideParameters =

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(
  screen_orientation: {wire_key: 'screenOrientation', nullable: true, ref: 'Emulation::ScreenOrientation'},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
SetUserAgentOverrideParameters =

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(
  user_agent: {wire_key: 'userAgent', nullable: true, primitive: 'string'},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
SetViewportMetaOverrideParameters =

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(
  viewport_meta: {wire_key: 'viewportMeta', nullable: true, const: true},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
SetScriptingEnabledParameters =

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(
  enabled: {wire_key: 'enabled', nullable: true, const: false},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
SetScrollbarTypeOverrideParameters =

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(
  scrollbar_type: {
    wire_key: 'scrollbarType',
    nullable: true,
    enum: 'Emulation::SET_SCROLLBAR_TYPE_OVERRIDE_PARAMETERS_SCROLLBAR_TYPE'
  },
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
SetTimezoneOverrideParameters =

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(
  timezone: {wire_key: 'timezone', nullable: true, primitive: 'string'},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)
SetTouchOverrideParameters =

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_touch_points: {wire_key: 'maxTouchPoints', nullable: true, primitive: 'integer'},
  contexts: {wire_key: 'contexts', required: false, list: true},
  user_contexts: {wire_key: 'userContexts', required: false, list: true}
)

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

#geolocation_coordinatesObject

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.



246
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 246

def geolocation_coordinates(**) = GeolocationCoordinates.new(**)

#geolocation_position_errorObject

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.



247
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 247

def geolocation_position_error(**) = GeolocationPositionError.new(**)

#media_featureObject

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.



248
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 248

def media_feature(**) = MediaFeature.new(**)

#network_conditions_offlineObject

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.



249
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 249

def network_conditions_offline(**) = NetworkConditionsOffline.new(**)

#screen_areaObject

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.



250
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 250

def screen_area(**) = ScreenArea.new(**)

#screen_orientationObject

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.



251
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 251

def screen_orientation(**) = ScreenOrientation.new(**)

#set_forced_colors_mode_theme_override(theme:, 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.



256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 256

def set_forced_colors_mode_theme_override(
  theme:,
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  Serialization.validate!('theme', theme, Emulation::FORCED_COLORS_MODE_THEME)
  params = SetForcedColorsModeThemeOverrideParameters.new(
    theme: theme,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setForcedColorsModeThemeOverride', params: params)
end

#set_geolocation_override(contexts: Serialization::UNSET, user_contexts: Serialization::UNSET, coordinates: Serialization::UNSET, error: 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.



273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 273

def set_geolocation_override(
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET,
  coordinates: Serialization::UNSET,
  error: Serialization::UNSET
)
  params = SetGeolocationOverrideParameters.build(
    contexts: contexts,
    user_contexts: user_contexts,
    coordinates: coordinates,
    error: error
  )
  execute(cmd: 'emulation.setGeolocationOverride', params: params)
end

#set_locale_override(locale:, 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.



291
292
293
294
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 291

def set_locale_override(locale:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET)
  params = SetLocaleOverrideParameters.new(locale: locale, contexts: contexts, user_contexts: user_contexts)
  execute(cmd: 'emulation.setLocaleOverride', params: params)
end

#set_media_features_override(features:, 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.



299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 299

def set_media_features_override(
  features:,
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  params = SetMediaFeaturesOverrideParameters.new(
    features: features,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setMediaFeaturesOverride', params: params)
end

#set_network_conditions(network_conditions:, 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.



315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 315

def set_network_conditions(
  network_conditions:,
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  params = SetNetworkConditionsParameters.new(
    network_conditions: network_conditions,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setNetworkConditions', params: params)
end

#set_screen_orientation_override(screen_orientation:, 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.



331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 331

def set_screen_orientation_override(
  screen_orientation:,
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  params = SetScreenOrientationOverrideParameters.new(
    screen_orientation: screen_orientation,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setScreenOrientationOverride', params: params)
end

#set_screen_settings_override(screen_area:, 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.



347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 347

def set_screen_settings_override(
  screen_area:,
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  params = SetScreenSettingsOverrideParameters.new(
    screen_area: screen_area,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setScreenSettingsOverride', params: params)
end

#set_scripting_enabled(enabled:, 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.



363
364
365
366
367
368
369
370
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 363

def set_scripting_enabled(enabled:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET)
  params = SetScriptingEnabledParameters.new(
    enabled: enabled,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setScriptingEnabled', params: params)
end

#set_scrollbar_type_override(scrollbar_type:, 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.



375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 375

def set_scrollbar_type_override(
  scrollbar_type:,
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  Serialization.validate!(
    'scrollbarType',
    scrollbar_type,
    Emulation::SET_SCROLLBAR_TYPE_OVERRIDE_PARAMETERS_SCROLLBAR_TYPE
  )
  params = SetScrollbarTypeOverrideParameters.new(
    scrollbar_type: scrollbar_type,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setScrollbarTypeOverride', params: params)
end

#set_timezone_override(timezone:, 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.



396
397
398
399
400
401
402
403
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 396

def set_timezone_override(timezone:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET)
  params = SetTimezoneOverrideParameters.new(
    timezone: timezone,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setTimezoneOverride', params: params)
end

#set_touch_override(max_touch_points:, 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.



408
409
410
411
412
413
414
415
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 408

def set_touch_override(max_touch_points:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET)
  params = SetTouchOverrideParameters.new(
    max_touch_points: max_touch_points,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setTouchOverride', params: params)
end

#set_user_agent_override(user_agent:, 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.



420
421
422
423
424
425
426
427
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 420

def set_user_agent_override(user_agent:, contexts: Serialization::UNSET, user_contexts: Serialization::UNSET)
  params = SetUserAgentOverrideParameters.new(
    user_agent: user_agent,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setUserAgentOverride', params: params)
end

#set_viewport_meta_override(viewport_meta:, 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.



432
433
434
435
436
437
438
439
440
441
442
443
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 432

def set_viewport_meta_override(
  viewport_meta:,
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  params = SetViewportMetaOverrideParameters.new(
    viewport_meta: viewport_meta,
    contexts: contexts,
    user_contexts: user_contexts
  )
  execute(cmd: 'emulation.setViewportMetaOverride', params: params)
end