Skip to content

Commit f532800

Browse files
committed
Reordering declarations. Partially reverts 18f77ac
1 parent a19f07a commit f532800

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

Diff for: javascript/atoms/error.js

+33-33
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,6 @@ goog.provide('bot.Error');
2424
goog.provide('bot.ErrorCode');
2525

2626

27-
/**
28-
* Status strings enumerated in the W3C WebDriver protocol.
29-
* @enum {string}
30-
* @see https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors
31-
*/
32-
bot.Error.State = {
33-
ELEMENT_NOT_SELECTABLE: 'element not selectable',
34-
ELEMENT_NOT_VISIBLE: 'element not visible',
35-
INVALID_ARGUMENT: 'invalid argument',
36-
INVALID_COOKIE_DOMAIN: 'invalid cookie domain',
37-
INVALID_ELEMENT_COORDINATES: 'invalid element coordinates',
38-
INVALID_ELEMENT_STATE: 'invalid element state',
39-
INVALID_SELECTOR: 'invalid selector',
40-
INVALID_SESSION_ID: 'invalid session id',
41-
JAVASCRIPT_ERROR: 'javascript error',
42-
MOVE_TARGET_OUT_OF_BOUNDS: 'move target out of bounds',
43-
NO_SUCH_ALERT: 'no such alert',
44-
NO_SUCH_ELEMENT: 'no such element',
45-
NO_SUCH_FRAME: 'no such frame',
46-
NO_SUCH_WINDOW: 'no such window',
47-
SCRIPT_TIMEOUT: 'script timeout',
48-
SESSION_NOT_CREATED: 'session not created',
49-
STALE_ELEMENT_REFERENCE: 'stale element reference',
50-
TIMEOUT: 'timeout',
51-
UNABLE_TO_SET_COOKIE: 'unable to set cookie',
52-
UNEXPECTED_ALERT_OPEN: 'unexpected alert open',
53-
UNKNOWN_COMMAND: 'unknown command',
54-
UNKNOWN_ERROR: 'unknown error',
55-
UNKNOWN_METHOD: 'unknown method',
56-
UNSUPPORTED_OPERATION: 'unsupported operation'
57-
};
58-
59-
6027
/**
6128
* Error codes from the Selenium WebDriver protocol:
6229
* https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#response-status-codes
@@ -147,6 +114,39 @@ bot.Error = function(code, opt_message) {
147114
goog.inherits(bot.Error, Error);
148115

149116

117+
/**
118+
* Status strings enumerated in the W3C WebDriver protocol.
119+
* @enum {string}
120+
* @see https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors
121+
*/
122+
bot.Error.State = {
123+
ELEMENT_NOT_SELECTABLE: 'element not selectable',
124+
ELEMENT_NOT_VISIBLE: 'element not visible',
125+
INVALID_ARGUMENT: 'invalid argument',
126+
INVALID_COOKIE_DOMAIN: 'invalid cookie domain',
127+
INVALID_ELEMENT_COORDINATES: 'invalid element coordinates',
128+
INVALID_ELEMENT_STATE: 'invalid element state',
129+
INVALID_SELECTOR: 'invalid selector',
130+
INVALID_SESSION_ID: 'invalid session id',
131+
JAVASCRIPT_ERROR: 'javascript error',
132+
MOVE_TARGET_OUT_OF_BOUNDS: 'move target out of bounds',
133+
NO_SUCH_ALERT: 'no such alert',
134+
NO_SUCH_ELEMENT: 'no such element',
135+
NO_SUCH_FRAME: 'no such frame',
136+
NO_SUCH_WINDOW: 'no such window',
137+
SCRIPT_TIMEOUT: 'script timeout',
138+
SESSION_NOT_CREATED: 'session not created',
139+
STALE_ELEMENT_REFERENCE: 'stale element reference',
140+
TIMEOUT: 'timeout',
141+
UNABLE_TO_SET_COOKIE: 'unable to set cookie',
142+
UNEXPECTED_ALERT_OPEN: 'unexpected alert open',
143+
UNKNOWN_COMMAND: 'unknown command',
144+
UNKNOWN_ERROR: 'unknown error',
145+
UNKNOWN_METHOD: 'unknown method',
146+
UNSUPPORTED_OPERATION: 'unsupported operation'
147+
};
148+
149+
150150
/**
151151
* A map of error codes to state string.
152152
* @private {!Object.<bot.ErrorCode, bot.Error.State>}

0 commit comments

Comments
 (0)