Commit 19f9eb4d authored by Tatiana Buldina's avatar Tatiana Buldina Committed by Commit Bot

[ChromeDriver] Update to use the same status codes used by Selenium

Bug: chromedriver:2676
Change-Id: I41dcde8b296c5eacf6a49c6c37faf9de2e8f3202
Reviewed-on: https://chromium-review.googlesource.com/c/1351879Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Tatiana Buldina <buldina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611238}
parent 7045b769
...@@ -18,28 +18,28 @@ enum StatusCode { ...@@ -18,28 +18,28 @@ enum StatusCode {
kElementNotVisible = 11, kElementNotVisible = 11,
kInvalidElementState = 12, kInvalidElementState = 12,
kUnknownError = 13, kUnknownError = 13,
kInvalidArgument = 14,
kElementNotInteractable = 15,
kUnsupportedOperation = 16,
kJavaScriptError = 17, kJavaScriptError = 17,
kMoveTargetOutOfBounds = 18,
kXPathLookupError = 19, kXPathLookupError = 19,
kUnableToSetCookie = 20,
kTimeout = 21, kTimeout = 21,
kNoSuchWindow = 23, kNoSuchWindow = 23,
kInvalidCookieDomain = 24, kInvalidCookieDomain = 24,
kUnableToSetCookie = 25,
kUnexpectedAlertOpen = 26, kUnexpectedAlertOpen = 26,
kNoSuchAlert = 27, kNoSuchAlert = 27,
kScriptTimeout = 28, kScriptTimeout = 28,
kInvalidSelector = 32, kInvalidSelector = 32,
kSessionNotCreated = 33, kSessionNotCreated = 33,
kMoveTargetOutOfBounds = 34,
kElementNotInteractable = 60,
kInvalidArgument = 61,
kNoSuchCookie = 62,
kUnsupportedOperation = 405,
// Chrome-specific status codes. // Chrome-specific status codes.
kChromeNotReachable = 100, kChromeNotReachable = 100,
kNoSuchExecutionContext, kNoSuchExecutionContext,
kDisconnected, kDisconnected,
kForbidden = 103, kForbidden = 103,
kTabCrashed, kTabCrashed,
kNoSuchCookie,
kTargetDetached, kTargetDetached,
}; };
......
...@@ -71,9 +71,6 @@ def _ExceptionForLegacyResponse(response): ...@@ -71,9 +71,6 @@ def _ExceptionForLegacyResponse(response):
11: ElementNotVisible, 11: ElementNotVisible,
12: InvalidElementState, 12: InvalidElementState,
13: UnknownError, 13: UnknownError,
14: InvalidArgument,
15: ElementNotInteractable,
16: UnsupportedOperation,
17: JavaScriptError, 17: JavaScriptError,
19: XPathLookupError, 19: XPathLookupError,
21: Timeout, 21: Timeout,
...@@ -84,7 +81,10 @@ def _ExceptionForLegacyResponse(response): ...@@ -84,7 +81,10 @@ def _ExceptionForLegacyResponse(response):
28: ScriptTimeout, 28: ScriptTimeout,
32: InvalidSelector, 32: InvalidSelector,
33: SessionNotCreated, 33: SessionNotCreated,
105: NoSuchCookie 60: ElementNotInteractable,
61: InvalidArgument,
62: NoSuchCookie,
405: UnsupportedOperation
} }
status = response['status'] status = response['status']
msg = response['value']['message'] msg = response['value']['message']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment