$checkboxes_some_disabled_element_value1 =
$page->
findField('checkboxes_some_disabled_when_checkbox_trigger_checked[value1]'
);
$this->
assertNotEmpty($checkboxes_some_disabled_element_value1);
$checkboxes_some_disabled_element_value2 =
$page->
findField('checkboxes_some_disabled_when_checkbox_trigger_checked[value2]'
);
$this->
assertNotEmpty($checkboxes_some_disabled_element_value2);
$checkboxes_some_disabled_element_value3 =
$page->
findField('checkboxes_some_disabled_when_checkbox_trigger_checked[value3]'
);
$radios_checked_element =
$page->
findField('radios_checked_when_checkbox_trigger_checked'
);
$this->
assertNotEmpty($radios_checked_element);
// We want to select the specific radio buttons, not the whole radios field itself.
$radios_all_disabled_value1 =
$this->
xpath('//input[@name=:name][@value=:value]',
[':name' => 'radios_all_disabled_when_checkbox_trigger_checked', ':value' => 'value1'
]);
$this->
assertCount(1,
$radios_all_disabled_value1);
// We want to access the radio button directly for the rest of the test, so
// take it out of the array we got back from xpath().
$radios_all_disabled_value1 =
reset($radios_all_disabled_value1);
$radios_all_disabled_value2 =
$this->
xpath('//input[@name=:name][@value=:value]',
[':name' => 'radios_all_disabled_when_checkbox_trigger_checked', ':value' => 'value2'
]);
$this->
assertCount(1,
$radios_all_disabled_value2);
$radios_all_disabled_value2 =
reset($radios_all_disabled_value2);
$radios_some_disabled_value1 =
$this->
xpath('//input[@name=:name][@value=:value]',
[':name' => 'radios_some_disabled_when_checkbox_trigger_checked', ':value' => 'value1'
]);
$this->
assertCount(1,
$radios_some_disabled_value1);
$radios_some_disabled_value1 =
reset($radios_some_disabled_value1);