@Override
  public void click() {
    String tagName = getTagName();
    if ((tagName != null && "OPTION".equals(tagName.toUpperCase())) || driver.isInFrame()) {
      driver.resetPageIsLoading();
      driver.executeAtom(AndroidAtoms.CLICK, null, this);
      driver.waitForPageToLoad();
      if (driver.isInFrame()) {
        return;
      }
    }

    Point center = getCenterCoordinates();
    long downTime = SystemClock.uptimeMillis();
    final List<MotionEvent> events = new ArrayList<MotionEvent>();

    MotionEvent downEvent =
        MotionEvent.obtain(downTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, center.x,
            center.y, 0);
    events.add(downEvent);
    MotionEvent upEvent =
        MotionEvent.obtain(downTime, SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, center.x,
            center.y, 0);

    events.add(upEvent);

    driver.resetPageIsLoading();
    driver.getMotionSender().send(events);

    // If the page started loading we should wait
    // until the page is done loading.
    driver.waitForPageToLoad();
  }
@return a {@link Point} where x is the width, and y is the height.
selendroid-server/src/main/java/io/selendroid/server/model/AndroidWebElement.java