Skip to content

Commit

Permalink
[java] Code cleanup, deleting a debug print and unnecessary casts
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Oct 2, 2019
1 parent 81f83ca commit 8953f91
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private RelativeBy(Object rootLocator) {
private RelativeBy(Object rootLocator, List<Map<String, Object>> filters) {
if (rootLocator instanceof By) {
assertLocatorCanBeSerialized(rootLocator);
rootLocator = asAtomLocatorParameter((By) rootLocator);
rootLocator = asAtomLocatorParameter(rootLocator);
} else if (rootLocator instanceof Map) {
if (((Map<?, ?>) rootLocator).keySet().size() != 1) {
throw new IllegalArgumentException(
Expand Down Expand Up @@ -158,7 +158,6 @@ public List<WebElement> findElements(SearchContext context) {

@SuppressWarnings("unchecked")
List<WebElement> elements = (List<WebElement>) js.executeScript(FIND_ELEMENTS, this.toJson());
System.out.println(elements);
return elements;
}

Expand Down Expand Up @@ -215,7 +214,7 @@ private static Object asAtomLocatorParameter(Object object) {
throw new IllegalArgumentException("Expected locator to be either an element or a By: " + object);
}

assertLocatorCanBeSerialized((By) object);
assertLocatorCanBeSerialized(object);

Map<String, Object> raw = JSON.toType(JSON.toJson(object), MAP_TYPE);

Expand Down

0 comments on commit 8953f91

Please sign in to comment.