123456789_123456789_123456789_123456789_123456789_

Module: Selenium::WebDriver::BiDi::Protocol::ErrorCode

Overview

The BiDi ErrorCode enum: each wire value mapped to its Ruby exception class name.

Constant Summary

  • CLASS_NAMES =
    # File 'rb/lib/selenium/webdriver/bidi/protocol/error_code.rb', line 30
    {
      'invalid argument' => 'InvalidArgumentError',
      'invalid selector' => 'InvalidSelectorError',
      'invalid session id' => 'InvalidSessionIdError',
      'invalid web extension' => 'InvalidWebExtensionError',
      'move target out of bounds' => 'MoveTargetOutOfBoundsError',
      'no such alert' => 'NoSuchAlertError',
      'no such network collector' => 'NoSuchNetworkCollectorError',
      'no such element' => 'NoSuchElementError',
      'no such frame' => 'NoSuchFrameError',
      'no such handle' => 'NoSuchHandleError',
      'no such history entry' => 'NoSuchHistoryEntryError',
      'no such intercept' => 'NoSuchInterceptError',
      'no such network data' => 'NoSuchNetworkDataError',
      'no such node' => 'NoSuchNodeError',
      'no such request' => 'NoSuchRequestError',
      'no such screencast' => 'NoSuchScreencastError',
      'no such script' => 'NoSuchScriptError',
      'no such storage partition' => 'NoSuchStoragePartitionError',
      'no such user context' => 'NoSuchUserContextError',
      'no such web extension' => 'NoSuchWebExtensionError',
      'session not created' => 'SessionNotCreatedError',
      'unable to capture screen' => 'UnableToCaptureScreenError',
      'unable to close browser' => 'UnableToCloseBrowserError',
      'unable to set cookie' => 'UnableToSetCookieError',
      'unable to set file input' => 'UnableToSetFileInputError',
      'unavailable network data' => 'UnavailableNetworkDataError',
      'underspecified storage partition' => 'UnderspecifiedStoragePartitionError',
      'unknown command' => 'UnknownCommandError',
      'unknown error' => 'UnknownError',
      'unsupported operation' => 'UnsupportedOperationError'
    }.freeze

Class Method Summary

  • .for(code)

    The exception class for a wire error code, or WebDriverError for an unknown one.

Class Method Details

.for(code)

The exception class for a wire error code, or WebDriverError for an unknown one.

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/bidi/error.rb', line 40

def self.for(code)
  name = code && CLASS_NAMES[code]
  name ? Error.const_get(name) : Error::WebDriverError
end