ErrorResponse.d.ts 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /**
  2. * Copyright 2023 Google LLC.
  3. * Copyright (c) Microsoft Corporation.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. import type { ErrorResponse } from './generated/webdriver-bidi.js';
  18. import { ErrorCode } from './generated/webdriver-bidi.js';
  19. export declare class Exception {
  20. error: ErrorCode;
  21. message: string;
  22. stacktrace?: string | undefined;
  23. constructor(error: ErrorCode, message: string, stacktrace?: string | undefined);
  24. toErrorResponse(commandId: number): ErrorResponse;
  25. }
  26. export declare class InvalidArgumentException extends Exception {
  27. constructor(message: string, stacktrace?: string);
  28. }
  29. export declare class InvalidSelectorException extends Exception {
  30. constructor(message: string, stacktrace?: string);
  31. }
  32. export declare class InvalidSessionIdException extends Exception {
  33. constructor(message: string, stacktrace?: string);
  34. }
  35. export declare class MoveTargetOutOfBoundsException extends Exception {
  36. constructor(message: string, stacktrace?: string);
  37. }
  38. export declare class NoSuchAlertException extends Exception {
  39. constructor(message: string, stacktrace?: string);
  40. }
  41. export declare class NoSuchElementException extends Exception {
  42. constructor(message: string, stacktrace?: string);
  43. }
  44. export declare class NoSuchFrameException extends Exception {
  45. constructor(message: string, stacktrace?: string);
  46. }
  47. export declare class NoSuchHandleException extends Exception {
  48. constructor(message: string, stacktrace?: string);
  49. }
  50. export declare class NoSuchHistoryEntryException extends Exception {
  51. constructor(message: string, stacktrace?: string);
  52. }
  53. export declare class NoSuchInterceptException extends Exception {
  54. constructor(message: string, stacktrace?: string);
  55. }
  56. export declare class NoSuchNodeException extends Exception {
  57. constructor(message: string, stacktrace?: string);
  58. }
  59. export declare class NoSuchRequestException extends Exception {
  60. constructor(message: string, stacktrace?: string);
  61. }
  62. export declare class NoSuchScriptException extends Exception {
  63. constructor(message: string, stacktrace?: string);
  64. }
  65. export declare class NoSuchUserContextException extends Exception {
  66. constructor(message: string, stacktrace?: string);
  67. }
  68. export declare class SessionNotCreatedException extends Exception {
  69. constructor(message: string, stacktrace?: string);
  70. }
  71. export declare class UnknownCommandException extends Exception {
  72. constructor(message: string, stacktrace?: string);
  73. }
  74. export declare class UnknownErrorException extends Exception {
  75. constructor(message: string, stacktrace?: string | undefined);
  76. }
  77. export declare class UnableToCaptureScreenException extends Exception {
  78. constructor(message: string, stacktrace?: string);
  79. }
  80. export declare class UnableToCloseBrowserException extends Exception {
  81. constructor(message: string, stacktrace?: string);
  82. }
  83. export declare class UnsupportedOperationException extends Exception {
  84. constructor(message: string, stacktrace?: string);
  85. }
  86. export declare class NoSuchStoragePartitionException extends Exception {
  87. constructor(message: string, stacktrace?: string);
  88. }
  89. export declare class UnableToSetCookieException extends Exception {
  90. constructor(message: string, stacktrace?: string);
  91. }
  92. export declare class UnableToSetFileInputException extends Exception {
  93. constructor(message: string, stacktrace?: string);
  94. }
  95. export declare class UnderspecifiedStoragePartitionException extends Exception {
  96. constructor(message: string, stacktrace?: string);
  97. }