code: public Point getCenter() {
          Point upperLeft = this.getLocation();
          Dimension dimensions = this.getSize();
          return new Point(upperLeft.getX() + dimensions.getWidth() / 2,
              upperLeft.getY() + dimensions.getHeight() / 2);
      }
docs: Method returns central coordinates of an element.
  @return The instance of the {@link org.openqa.selenium.Point}