@Override Object getInternalValue() { return isChecked(); }
/** * A checkbox does not have a textual representation, * but we invent one for it because it is useful for testing. * @return "checked" or "unchecked" according to the radio state */ // we need to preserve this method as it is there since many versions with the above documentation. @Override public String asText() { if (isChecked()) { return "checked"; } return "unchecked"; }
/** * A checkbox does not have a textual representation, * but we invent one for it because it is useful for testing. * @return "checked" or "unchecked" according to the radio state */ // we need to preserve this method as it is there since many versions with the above documentation. @Override public String asText() { if (isChecked()) { return "checked"; } return "unchecked"; }
/** * A checkbox does not have a textual representation, * but we invent one for it because it is useful for testing. * @return "checked" or "unchecked" according to the radio state */ // we need to preserve this method as it is there since many versions with the above documentation. @Override public String asText() { if (isChecked()) { return "checked"; } return "unchecked"; }
@Override Object getInternalValue() { return isChecked(); }
/** * Process {@link HtmlCheckBoxInput}. * * @param builder the StringBuilder to add to * @param htmlCheckBoxInput the target to process */ protected void doAppendCheckBoxInput(final StringBuilder builder, final HtmlCheckBoxInput htmlCheckBoxInput) { if (htmlCheckBoxInput.isChecked()) { builder.append("checked"); } else { builder.append("unchecked"); } }
/** * Process {@link HtmlCheckBoxInput}. * * @param builder the StringBuilder to add to * @param htmlCheckBoxInput the target to process */ protected void doAppendCheckBoxInput(final StringBuilder builder, final HtmlCheckBoxInput htmlCheckBoxInput) { if (htmlCheckBoxInput.isChecked()) { builder.append("checked"); } else { builder.append("unchecked"); } }
/** * {@inheritDoc} */ @Override protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey) throws IOException { checkedState_ = !isChecked(); super.doClickStateUpdate(shiftKey, ctrlKey); return true; }
@Override public boolean isCheckboxSelected(String checkBoxName, String checkBoxValue) { HtmlCheckBoxInput cb = getCheckbox(checkBoxName, checkBoxValue); return cb.isChecked(); }
/** * {@inheritDoc} */ @Override protected void preventDefault() { setChecked(!isChecked()); }
@Override public boolean isCheckboxSelected(String checkBoxName) { HtmlCheckBoxInput cb = getCheckbox(checkBoxName); return cb.isChecked(); }
/** * {@inheritDoc} */ @Override protected void preventDefault() { setChecked(!isChecked()); }
/** * {@inheritDoc} */ @Override protected void preventDefault() { setChecked(!isChecked()); }
/** * {@inheritDoc} */ @Override protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey) throws IOException { checkedState_ = !isChecked(); super.doClickStateUpdate(shiftKey, ctrlKey); return true; }
@Override public void checkCheckbox(String checkBoxName, String value) { HtmlCheckBoxInput cb = getCheckbox(checkBoxName, value); if (!cb.isChecked()) { try { cb.click(); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("checkCheckbox failed", e); } } }
@Override public void uncheckCheckbox(String checkBoxName, String value) { HtmlCheckBoxInput cb = getCheckbox(checkBoxName, value); if (cb.isChecked()) { try { cb.click(); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException("uncheckCheckbox failed", e); } } }
/** * Select a specified checkbox. If the checkbox is already checked then the checkbox will stay checked. * * @param checkBoxName name of checkbox to be deselected. */ @Override public void checkCheckbox(String checkBoxName) { HtmlCheckBoxInput cb = getCheckbox(checkBoxName); if (!cb.isChecked()) { try { cb.click(); } catch (IOException e) { throw new RuntimeException("checkCheckbox failed", e); } } }
/** * Override so that checkbox can change its state correctly when its * click() method is called. * * {@inheritDoc} */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { setChecked(!isChecked()); return super.doClickAction(defaultPage); }
/** * Override so that checkbox can change its state correctly when its * click() method is called. * * {@inheritDoc} */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { setChecked(!isChecked()); return super.doClickAction(defaultPage); }
/** * Override so that checkbox can change its state correctly when its * click() method is called. * * {@inheritDoc} */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { setChecked(!isChecked()); return super.doClickAction(defaultPage); }