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
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: 'integer'},
  longitude: {wire_key: 'longitude', primitive: 'integer'},
  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: 'integer'},
  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}
)
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: 'width', height: 'height')
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}
)
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},
  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},
  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},
  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

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



189
190
191
192
193
194
195
196
197
198
199
200
201
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 189

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.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 205

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.



222
223
224
225
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 222

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



229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 229

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.



244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 244

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.



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

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.



274
275
276
277
278
279
280
281
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 274

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.



285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 285

def set_scrollbar_type_override(
  scrollbar_type:,
  contexts: Serialization::UNSET,
  user_contexts: Serialization::UNSET
)
  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.



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

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.



311
312
313
314
315
316
317
318
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 311

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.



322
323
324
325
326
327
328
329
# File 'lib/selenium/webdriver/bidi/protocol/emulation.rb', line 322

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