Skip to content

Commit

Permalink
build(spec): update WebDriverBidi types
Browse files Browse the repository at this point in the history
  • Loading branch information
browser-automation-bot authored and jrandolf-2 committed Jan 15, 2024
1 parent 2ee9c27 commit 0ef66d1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/protocol-parser/generated/webdriver-bidi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const ErrorCodeSchema = z.lazy(() =>
'unable to capture screen',
'unable to close browser',
'unable to set cookie',
'unable to set file input',
'underspecified storage partition',
'unknown command',
'unknown error',
Expand Down
1 change: 1 addition & 0 deletions src/protocol/ErrorResponse.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe('Exception', () => {
[ErrorCode.UnableToCaptureScreen]: undefined,
[ErrorCode.UnableToCloseBrowser]: undefined,
[ErrorCode.UnableToSetCookie]: undefined,
[ErrorCode.UnableToSetFileInput]: undefined,
[ErrorCode.UnderspecifiedStoragePartition]: undefined,
[ErrorCode.UnknownCommand]: undefined,
[ErrorCode.UnknownError]: undefined,
Expand Down
6 changes: 6 additions & 0 deletions src/protocol/ErrorResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ export class UnableToSetCookieException extends Exception {
}
}

export class UnableToSetFileInputException extends Exception {
constructor(message: string, stacktrace?: string) {
super(ErrorCode.UnableToSetFileInput, message, stacktrace);
}
}

export class UnderspecifiedStoragePartitionException extends Exception {
constructor(message: string, stacktrace?: string) {
super(ErrorCode.UnderspecifiedStoragePartition, message, stacktrace);
Expand Down
1 change: 1 addition & 0 deletions src/protocol/generated/webdriver-bidi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export const enum ErrorCode {
UnableToCaptureScreen = 'unable to capture screen',
UnableToCloseBrowser = 'unable to close browser',
UnableToSetCookie = 'unable to set cookie',
UnableToSetFileInput = 'unable to set file input',
UnderspecifiedStoragePartition = 'underspecified storage partition',
UnknownCommand = 'unknown command',
UnknownError = 'unknown error',
Expand Down

0 comments on commit 0ef66d1

Please sign in to comment.