Skip to content

Commit

Permalink
DanielWagnerHall: Adding missing error codes
Browse files Browse the repository at this point in the history
r13256
  • Loading branch information
illicitonion committed Aug 5, 2011
1 parent 5781cf7 commit d9cbeff
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions java/client/src/org/openqa/selenium/remote/ErrorCodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class ErrorCodes {
public static final int NO_SUCH_WINDOW = 23;
public static final int INVALID_COOKIE_DOMAIN = 24;
public static final int UNABLE_TO_SET_COOKIE = 25;
public static final int UNEXPECTED_ALERT_PRESENT = 26;
public static final int NO_ALERT_PRESENT = 27;
public static final int ASYNC_SCRIPT_TIMEOUT = 28;
public static final int INVALID_ELEMENT_COORDINATES = 29;
Expand Down
2 changes: 2 additions & 0 deletions py/selenium/webdriver/remote/errorhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class ErrorCode(object):
NO_SUCH_WINDOW = 23
INVALID_COOKIE_DOMAIN = 24
UNABLE_TO_SET_COOKIE = 25
UNEXPECTED_ALERT_OPEN = 26
NO_ALERT_OPEN = 27
SCRIPT_TIMEOUT = 28
INVALID_ELEMENT_COORDINATES = 29
INVALID_SELECTOR = 32
Expand Down
6 changes: 3 additions & 3 deletions rb/lib/selenium/webdriver/common/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class NoSuchWindowError < WebDriverError; end # 23
class InvalidCookieDomainError < WebDriverError; end # 24
class UnableToSetCookieError < WebDriverError; end # 25
# 26
class NoModalDialogOpenError < WebDriverError; end # 27
class NoAlertDialogOpenError < WebDriverError; end # 27
class ScriptTimeOutError < WebDriverError; end # 28
class InvalidElementCoordinatesError < WebDriverError; end # 29
# 30
Expand Down Expand Up @@ -63,8 +63,8 @@ class UnsupportedOperationError < WebDriverError; end
NoSuchWindowError, # 23
InvalidCookieDomainError, # 24
UnableToSetCookieError, # 25
nil, # 26
NoModalDialogOpenError, # 27
UnexpectedAlertError, # 26
NoAlertOpenError, # 27
ScriptTimeOutError, # 28
InvalidElementCoordinatesError, # 29
nil, # 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
not_compliant_on :browser => [:chrome, :ie] do
it "raises UnhandledError if no alert is present" do
lambda { driver.switch_to.alert }.should raise_error(
Selenium::WebDriver::Error::NoModalDialogOpenError, /alert/i)
Selenium::WebDriver::Error::NoAlertOpenError, /alert/i)
end
end

Expand Down
8 changes: 4 additions & 4 deletions wire.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ def main():
a cookie under a different domain than the current page.'),
ErrorCode(25, 'UnableToSetCookie', 'A request to set a cookie\'s value \
could not be satisfied.'),
ErrorCode(26, 'UnexpectedAlertOpen', 'An alert was open, blocking this \
operation'),
ErrorCode(27, 'NoModalDialogOpenError', 'An attempt was made to operate \
on a modal dialog when one was not open.'),
ErrorCode(26, 'UnexpectedAlertOpen', 'A modal dialog was open, blocking \
this operation'),
ErrorCode(27, 'NoAlertOpenError', 'An attempt was made to operate on a \
modal dialog when one was not open.'),
ErrorCode(28, 'ScriptTimeout', 'A script did not complete before its \
timeout expired.'),
ErrorCode(29, 'InvalidElementCoordinates', 'The coordinates provided to \
Expand Down

0 comments on commit d9cbeff

Please sign in to comment.