code: public boolean isWithinBoundsOfWindow() throws WidgetException {
  		
  		JavascriptExecutor js = ((JavascriptExecutor) getGUIDriver().getWrappedDriver());
  		
  		// execute javascript to get scroll values
  		Object top = js.executeScript("return document.body.scrollTop;");
  		Object left = js.executeScript("return document.body.scrollLeft;");
  		
  		int scrollTop;
  		int scrollLeft;
  		try {
  			scrollTop = Integer.parseInt(top+"");
  			scrollLeft = Integer.parseInt(left+"");
  		}
  		catch(NumberFormatException e) {
  			throw new WidgetException("There was an error parsing the scroll values from the page", getByLocator());
  		}
  		
  		// calculate bounds
  		Dimension dim = getGUIDriver().getWrappedDriver().manage().window().getSize();
  		int windowWidth = dim.getWidth();
  		int windowHeight = dim.getHeight();
  		int x = ((Locatable)getWebElement()).getCoordinates().onPage().getX();
  		int y = ((Locatable)getWebElement()).getCoordinates().onPage().getY();
  		int relX = x - scrollLeft;
  		int relY = y - scrollTop;
  		return relX + findElement().getSize().getWidth() <= windowWidth && 
  				relY + findElement().getSize().getHeight() <= windowHeight && 
  					relX >= 0 && relY >= 0;
  	}
docs: *
  Determine if the element is within the bounds of the window
  
  @return true or false
  @throws WidgetException