Asserts that a checkbox field in the current page is checked.
$id: ID of field to assert.
$message: (optional) Message to display.
TRUE on pass, FALSE on fail.
protected function assertFieldChecked($id, $message = '') {
$elements = $this
->xpath('//input[@id=:id]', array(
':id' => $id,
));
return $this
->assertTrue(isset($elements[0]) && !empty($elements[0]['checked']), $message ? $message : t('Checkbox field @id is checked.', array(
'@id' => $id,
)), t('Browser'));
}