public function isChecked($xpath) {
    $this->findElement($xpath, 1);
    $javascript = $this->javascriptTemplateRender("is_checked.js.twig", array("xpath" => $xpath));
    $checked = $this->browser->evaluate($javascript);

    if ($checked === null) {
      throw new DriverException("Can not check when the element is not checkbox or radio");
    }

    return $checked;
  }
public function isChecked($xpath) {
    $this->findElement($xpath, 1);
    $javascript = $this->javascriptTemplateRender("is_checked.js.twig", array("xpath" => $xpath));
    $checked = $this->browser->evaluate($javascript);

    if ($checked === null) {
      throw new DriverException("Can not check when the element is not checkbox or radio");
    }

    return $checked;
  }
public function isChecked ( $ xpath ) { $ this -> findElement ( $ xpath , 1 ) ; $ javascript = $ this -> javascriptTemplateRender ( "is_checked.js.twig" , array ( "xpath" => $ xpath ) ) ; $ checked = $ this -> browser -> evaluate ( $ javascript ) ; if ( $ checked === null ) { throw new DriverException ( "Can not check when the element is not checkbox or radio" ) ; } return $ checked ; }
Checks if the radio or checkbox is checked
@param string $xpath
@return bool
@throws DriverException
Checks if the radio or checkbox is checked