private function getCheckboxField($xpath)
    {
        $field = $this->getFormField($xpath);

        if (!$field instanceof ChoiceFormField) {
            throw new DriverException(sprintf('Impossible to check the element with XPath "%s" as it is not a checkbox', $xpath));
        }

        return $field;
    }
private function getCheckboxField($xpath)
    {
        $field = $this->getFormField($xpath);

        if (!$field instanceof ChoiceFormField) {
            throw new DriverException(sprintf('Impossible to check the element with XPath "%s" as it is not a checkbox', $xpath));
        }

        return $field;
    }
private function getCheckboxField ( $ xpath ) { $ field = $ this -> getFormField ( $ xpath ) ; if ( ! $ field instanceof ChoiceFormField ) { throw new DriverException ( sprintf ( 'Impossible to check the element with XPath "%s" as it is not a checkbox' , $ xpath ) ) ; } return $ field ; }
Returns the checkbox field from xpath query, ensuring it is valid.

@param string $xpath

@return ChoiceFormField

@throws DriverException when the field is not a checkbox
Returns the checkbox field from xpath query ensuring it is valid .