/** * Sets the checked property. Although this property is defined in Input it * doesn't make any sense for input's other than checkbox and radio. This * implementation does nothing. The implementations in Checkbox and Radio * actually do the work. * * @param checked True if this input should have the "checked" attribute set */ public void jsxSet_checked(final boolean checked) { ((HtmlInput) getDomNodeOrDie()).setChecked(checked); }
/** * Sets the checked property. Although this property is defined in Input it * doesn't make any sense for input's other than checkbox and radio. This * implementation does nothing. The implementations in Checkbox and Radio * actually do the work. * * @param checked True if this input should have the "checked" attribute set */ public void jsxSet_checked(final boolean checked) { ((HtmlInput) getDomNodeOrDie()).setChecked(checked); }
/** * Sets the checked property. Although this property is defined in Input it * doesn't make any sense for input's other than checkbox and radio. This * implementation does nothing. The implementations in Checkbox and Radio * actually do the work. * * @param checked True if this input should have the "checked" attribute set */ public void jsxSet_checked(final boolean checked) { ((HtmlInput) getDomNodeOrDie()).setChecked(checked); }
/** * Sets the checked property. Although this property is defined in Input it * doesn't make any sense for input's other than checkbox and radio. This * implementation does nothing. The implementations in Checkbox and Radio * actually do the work. * * @param checked True if this input should have the {@code checked} attribute set */ @JsxSetter public void setChecked(final boolean checked) { getDomNodeOrDie().setChecked(checked); }
/** * Sets the checked property. Although this property is defined in Input it * doesn't make any sense for input's other than checkbox and radio. This * implementation does nothing. The implementations in Checkbox and Radio * actually do the work. * * @param checked True if this input should have the {@code checked} attribute set */ @JsxSetter public void setChecked(final boolean checked) { getDomNodeOrDie().setChecked(checked); }
public void setSelected() { assertElementNotStale(); String disabledValue = element.getAttribute("disabled"); if (disabledValue.length() > 0) { throw new UnsupportedOperationException("You may not select a disabled element"); } if (element instanceof HtmlInput) ((HtmlInput) element).setChecked(true); else if (element instanceof HtmlOption) ((HtmlOption) element).setSelected(true); else throw new UnsupportedOperationException("Unable to select element. Tag name is: " + element.getTagName()); }
/** * Logs in to Jenkins. */ public WebClient login(String username, String password, boolean rememberMe) throws Exception { HtmlPage page = goTo("login"); // page = (HtmlPage) page.getFirstAnchorByText("Login").click(); HtmlForm form = page.getFormByName("login"); form.getInputByName("j_username").setValueAttribute(username); form.getInputByName("j_password").setValueAttribute(password); try { form.getInputByName("remember_me").setChecked(rememberMe); } catch (ElementNotFoundException e) { // remember me not available is OK so long as the caller didn't ask for it assert !rememberMe; } HtmlFormUtil.submit(form, null); return this; }