public int getViewportHeight() {
<BUG>return viewportHeight != -1 ? viewportHeight : executeJsScript(VIEWPORT_HEIGHT_JS);
</BUG>
}
<BUG>public Coordinates getBoundingClientRect(WebElement element) {
String script = null;
try {
script = IOUtils.toString(Thread.currentThread().getContextClassLoader().getResourceAsStream(RELATIVE_COORDS_JS));
} catch (IOException e) {
e.printStackTrace();
}
JavascriptExecutor js = (JavascriptExecutor) driver;
ArrayList<String> list = (ArrayList<String>) js.executeScript(script, element);
</BUG>
Point start = new Point(Integer.parseInt(list.get(0)), Integer.parseInt(list.get(1)));

public int getViewportHeight() {
return viewportHeight != -1 ? viewportHeight : ((Long) executeJsScript(VIEWPORT_HEIGHT_JS)).intValue();
}
public Coordinates getBoundingClientRect(WebElement element) {
String script = FileUtil.getJsScript(RELATIVE_COORDS_JS);
ArrayList<String> list = (ArrayList<String>) executeJsScript(RELATIVE_COORDS_JS, element);
Point start = new Point(Integer.parseInt(list.get(0)), Integer.parseInt(list.get(1)));
