Skip to content

Commit a286dfa

Browse files
committed
atoms: align list of error strings with W3C WebDriver protocol
1 parent 20d3c98 commit a286dfa

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

javascript/atoms/error.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ bot.ErrorCode = {
6565
};
6666

6767

68-
6968
/**
7069
* Error extension that includes error status codes from the WebDriver wire
7170
* protocol:
@@ -125,28 +124,27 @@ goog.inherits(bot.Error, Error);
125124
bot.Error.State = {
126125
ELEMENT_NOT_SELECTABLE: 'element not selectable',
127126
ELEMENT_NOT_VISIBLE: 'element not visible',
128-
IME_ENGINE_ACTIVATION_FAILED: 'ime engine activation failed',
129-
IME_NOT_AVAILABLE: 'ime not available',
127+
INVALID_ARGUMENT: 'invalid argument',
130128
INVALID_COOKIE_DOMAIN: 'invalid cookie domain',
131129
INVALID_ELEMENT_COORDINATES: 'invalid element coordinates',
132130
INVALID_ELEMENT_STATE: 'invalid element state',
133131
INVALID_SELECTOR: 'invalid selector',
132+
INVALID_SESSION_ID: 'invalid session id',
134133
JAVASCRIPT_ERROR: 'javascript error',
135134
MOVE_TARGET_OUT_OF_BOUNDS: 'move target out of bounds',
136135
NO_SUCH_ALERT: 'no such alert',
137-
NO_SUCH_DOM: 'no such dom',
138136
NO_SUCH_ELEMENT: 'no such element',
139137
NO_SUCH_FRAME: 'no such frame',
140138
NO_SUCH_WINDOW: 'no such window',
141139
SCRIPT_TIMEOUT: 'script timeout',
142140
SESSION_NOT_CREATED: 'session not created',
143141
STALE_ELEMENT_REFERENCE: 'stale element reference',
144-
SUCCESS: 'success',
145142
TIMEOUT: 'timeout',
146143
UNABLE_TO_SET_COOKIE: 'unable to set cookie',
147144
UNEXPECTED_ALERT_OPEN: 'unexpected alert open',
148145
UNKNOWN_COMMAND: 'unknown command',
149146
UNKNOWN_ERROR: 'unknown error',
147+
UNKNOWN_METHOD: 'unknown method',
150148
UNSUPPORTED_OPERATION: 'unsupported operation'
151149
};
152150

@@ -163,8 +161,8 @@ goog.scope(function() {
163161

164162
map[code.ELEMENT_NOT_SELECTABLE] = state.ELEMENT_NOT_SELECTABLE;
165163
map[code.ELEMENT_NOT_VISIBLE] = state.ELEMENT_NOT_VISIBLE;
166-
map[code.IME_ENGINE_ACTIVATION_FAILED] = state.IME_ENGINE_ACTIVATION_FAILED;
167-
map[code.IME_NOT_AVAILABLE] = state.IME_NOT_AVAILABLE;
164+
map[code.IME_ENGINE_ACTIVATION_FAILED] = state.UNKNOWN_ERROR;
165+
map[code.IME_NOT_AVAILABLE] = state.UNKNOWN_ERROR;
168166
map[code.INVALID_COOKIE_DOMAIN] = state.INVALID_COOKIE_DOMAIN;
169167
map[code.INVALID_ELEMENT_COORDINATES] = state.INVALID_ELEMENT_COORDINATES;
170168
map[code.INVALID_ELEMENT_STATE] = state.INVALID_ELEMENT_STATE;
@@ -181,7 +179,6 @@ goog.scope(function() {
181179
map[code.SCRIPT_TIMEOUT] = state.SCRIPT_TIMEOUT;
182180
map[code.SESSION_NOT_CREATED] = state.SESSION_NOT_CREATED;
183181
map[code.STALE_ELEMENT_REFERENCE] = state.STALE_ELEMENT_REFERENCE;
184-
map[code.SUCCESS] = state.SUCCESS;
185182
map[code.TIMEOUT] = state.TIMEOUT;
186183
map[code.UNABLE_TO_SET_COOKIE] = state.UNABLE_TO_SET_COOKIE;
187184
map[code.UNEXPECTED_ALERT_OPEN] = state.UNEXPECTED_ALERT_OPEN

0 commit comments

Comments
 (0)