Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,4 @@ public void testRemovingAnElementDynamicallyFromTheDomShouldCauseAStaleRefExcept
boolean wasStale = wait.until(stalenessOf(toBeDeleted));
assertTrue("Element should be stale at this point", wasStale);
}

private Callable<Boolean> elementToBeStale(final WebElement element) {
return new Callable<Boolean>() {

public Boolean call() throws Exception {
try {
element.isDisplayed();
return false;
} catch (StaleElementReferenceException e) {
return true;
}
}
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -281,20 +281,6 @@ public void testMovingIntoAnImageEnclosedInALink() {
wait.until(titleIs("We Arrive Here"));
}

@SuppressWarnings("unchecked")
private Map<String, Object> getElementSize(WebElement element) {
return (Map<String, Object>) ((JavascriptExecutor) driver).executeScript(
"return arguments[0].getBoundingClientRect()", element);
}

private int getHeight(Map<String, Object> sizeRect) {
if (sizeRect.containsKey("height")) {
return getFieldValue(sizeRect, "height");
} else {
return getFieldValue(sizeRect, "bottom") - getFieldValue(sizeRect, "top");
}
}

private int getFieldValue(Map<String, Object> sizeRect, String fieldName) {
return (int) Double.parseDouble(sizeRect.get(fieldName).toString());
}
Expand Down