Skip to content

Commit

Permalink
Deleting deprecated XPathLookupException
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 19, 2013
1 parent 34e54b6 commit 3c264ec
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 43 deletions.
34 changes: 0 additions & 34 deletions java/client/src/org/openqa/selenium/XPathLookupException.java

This file was deleted.

1 change: 0 additions & 1 deletion java/client/src/org/openqa/selenium/build.desc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ java_library(name = "webdriver-api",
"UnsupportedCommandException.java",
"WebDriver.java",
"WebElement.java",
"XPathLookupException.java",
"html5/*.java",
"internal/FindsByClassName.java",
"internal/FindsByCssSelector.java",
Expand Down
7 changes: 1 addition & 6 deletions java/client/src/org/openqa/selenium/remote/ErrorCodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.openqa.selenium.UnhandledAlertException;
import org.openqa.selenium.UnsupportedCommandException;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.XPathLookupException;
import org.openqa.selenium.interactions.InvalidCoordinatesException;
import org.openqa.selenium.interactions.MoveTargetOutOfBoundsException;

Expand Down Expand Up @@ -80,7 +79,6 @@ public class ErrorCodes {
public static final int INVALID_SELECTOR_ERROR = 32;
public static final int SESSION_NOT_CREATED = 33;
public static final int MOVE_TARGET_OUT_OF_BOUNDS = 34;
public static final int SQL_DATABASE_ERROR = 35;
public static final int INVALID_XPATH_SELECTOR = 51;
public static final int INVALID_XPATH_SELECTOR_RETURN_TYPER = 52;
// The following error codes are derived straight from HTTP return codes.
Expand Down Expand Up @@ -143,6 +141,7 @@ public Class<? extends WebDriverException> getExceptionType(int statusCode) {
case INVALID_SELECTOR_ERROR:
case INVALID_XPATH_SELECTOR:
case INVALID_XPATH_SELECTOR_RETURN_TYPER:
case XPATH_LOOKUP_ERROR:
return InvalidSelectorException.class;
case MOVE_TARGET_OUT_OF_BOUNDS:
return MoveTargetOutOfBoundsException.class;
Expand All @@ -158,8 +157,6 @@ public Class<? extends WebDriverException> getExceptionType(int statusCode) {
case ELEMENT_NOT_SELECTABLE:
case INVALID_ELEMENT_STATE:
return InvalidElementStateException.class;
case XPATH_LOOKUP_ERROR:
return XPathLookupException.class;
case ASYNC_SCRIPT_TIMEOUT:
case TIMEOUT:
return TimeoutException.class;
Expand Down Expand Up @@ -223,8 +220,6 @@ public int toStatusCode(Throwable thrown) {
return UNABLE_TO_SET_COOKIE;
} else if (thrown instanceof UnhandledAlertException) {
return UNEXPECTED_ALERT_PRESENT;
} else if (thrown instanceof XPathLookupException) {
return XPATH_LOOKUP_ERROR;
} else {
return UNHANDLED_ERROR;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
import org.junit.Test;
import org.openqa.selenium.ElementNotVisibleException;
import org.openqa.selenium.InvalidElementStateException;
import org.openqa.selenium.InvalidSelectorException;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.NoSuchFrameException;
import org.openqa.selenium.NoSuchWindowException;
import org.openqa.selenium.StaleElementReferenceException;
import org.openqa.selenium.UnsupportedCommandException;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.XPathLookupException;
import org.openqa.selenium.interactions.InvalidCoordinatesException;

import java.util.Map;
Expand Down Expand Up @@ -79,7 +79,7 @@ public void testThrowsCorrectExceptionTypes() {
assertThrowsCorrectExceptionType(
ErrorCodes.INVALID_ELEMENT_STATE, InvalidElementStateException.class);
assertThrowsCorrectExceptionType(
ErrorCodes.XPATH_LOOKUP_ERROR, XPathLookupException.class);
ErrorCodes.XPATH_LOOKUP_ERROR, InvalidSelectorException.class);
assertThrowsCorrectExceptionType(ErrorCodes.INVALID_ELEMENT_COORDINATES,
InvalidCoordinatesException.class);
}
Expand Down

0 comments on commit 3c264ec

Please sign in to comment.