protected function inputCheckableControl($xpath) {
    $element = $this->findElement($xpath, 1);
    $tagName = strtolower($this->browser->tagName($element["page_id"], $element["ids"][0]));
    $attributes = $this->browser->attributes($element["page_id"], $element["ids"][0]);
    if ($tagName != "input") {
      throw new DriverException("Can not check when the element is not of the input type");
    }
    if (!in_array($attributes["type"], array("checkbox", "radio"))) {
      throw new DriverException("Can not check when the element is not checkbox or radio");
    }
    return true;
  }