/** * Returns the value of the "selected" property. * @return the text property */ public boolean jsxGet_selected() { return getDomNodeOrNull().isSelected(); }
/** * Selects the option if it's not already selected. * {@inheritDoc} */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { if (!isSelected()) { return setSelected(true); } return defaultPage; }
/** * Selects the option if it's not already selected. * {@inheritDoc} */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { if (!isSelected()) { return setSelected(true); } return defaultPage; }
/** * Selects the option if it's not already selected. * {@inheritDoc} */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { if (!isSelected()) { return setSelected(true); } return defaultPage; }
/** * Returns the value of the "selected" property. * @return the text property */ public boolean jsxGet_selected() { return getDomNodeOrNull().isSelected(); }
/** * Returns the value of the "selected" property. * @return the text property */ public boolean jsxGet_selected() { return getDomNodeOrNull().isSelected(); }
/** * Returns the value of the {@code selected} property. * @return the text property */ @JsxGetter public boolean isSelected() { final DomNode dom = getDomNodeOrNull(); if (dom instanceof HtmlOption) { return ((HtmlOption) dom).isSelected(); } return false; }
/** * Returns the value of the {@code selected} property. * @return the text property */ @JsxGetter public boolean isSelected() { final DomNode dom = getDomNodeOrNull(); if (dom instanceof HtmlOption) { return ((HtmlOption) dom).isSelected(); } return false; }
/** * {@inheritDoc} */ @Override public DomNode appendChild(final Node node) { final DomNode response = super.appendChild(node); if (node instanceof HtmlOption) { final HtmlOption option = (HtmlOption) node; if (option.isSelected()) { doSelectOption(option, true, false, false, false); } } return response; }
/** * {@inheritDoc} */ @Override public DomNode appendChild(final Node node) { final DomNode response = super.appendChild(node); if (node instanceof HtmlOption) { final HtmlOption option = (HtmlOption) node; if (option.isSelected()) { doSelectOption(option, true); } } return response; }
/** * {@inheritDoc} */ @Override public DomNode appendChild(final Node node) { final DomNode response = super.appendChild(node); if (node instanceof HtmlOption) { final HtmlOption option = (HtmlOption) node; if (option.isSelected()) { doSelectOption(option, true); } } return response; }
/** * {@inheritDoc} */ @Override public DomNode appendChild(final Node node) { final DomNode response = super.appendChild(node); if (node instanceof HtmlOption) { final HtmlOption option = (HtmlOption) node; if (option.isSelected()) { doSelectOption(option, true); } } return response; }
@Override public boolean isSelected() { assertElementNotStale(); if (element instanceof HtmlInput) { return ((HtmlInput) element).isChecked(); } else if (element instanceof HtmlOption) { return ((HtmlOption) element).isSelected(); } throw new UnsupportedOperationException( "Unable to determine if element is selected. Tag name is: " + element.getTagName()); }
/** * {@inheritDoc} */ @Override public DomNode appendChild(final Node node) { final DomNode response = super.appendChild(node); if (node instanceof HtmlOption) { final HtmlOption option = (HtmlOption) node; if (option.isSelected()) { doSelectOption(option, true, false, false, false); } } return response; }
public boolean isSelected() { assertElementNotStale(); if (element instanceof HtmlInput) return ((HtmlInput) element).isChecked(); else if (element instanceof HtmlOption) return ((HtmlOption) element).isSelected(); throw new UnsupportedOperationException("Unable to determine if element is selected. Tag name is: " + element.getTagName()); }
/** * {@inheritDoc} */ @Override public void insertBefore(final DomNode newNode) { super.insertBefore(newNode); if (newNode instanceof HtmlOption) { final HtmlOption option = (HtmlOption) newNode; if (option.isSelected()) { getEnclosingSelect().setSelectedAttribute(option, true); } } }
/** * {@inheritDoc} */ @Override public void insertBefore(final DomNode newNode) throws IllegalStateException { super.insertBefore(newNode); if (newNode instanceof HtmlOption) { final HtmlOption option = (HtmlOption) newNode; if (option.isSelected()) { getEnclosingSelect().setSelectedAttribute(option, true); } } }
/** * {@inheritDoc} */ @Override public void insertBefore(final DomNode newNode) throws IllegalStateException { super.insertBefore(newNode); if (newNode instanceof HtmlOption) { final HtmlOption option = (HtmlOption) newNode; if (option.isSelected()) { getEnclosingSelect().setSelectedAttribute(option, true); } } }
/** * {@inheritDoc} */ @Override public void insertBefore(final DomNode newNode) throws IllegalStateException { super.insertBefore(newNode); if (newNode instanceof HtmlOption) { final HtmlOption option = (HtmlOption) newNode; if (option.isSelected()) { getEnclosingSelect().setSelectedAttribute(option, true); } } }
/** * {@inheritDoc} */ @Override public void insertBefore(final DomNode newNode) { super.insertBefore(newNode); if (newNode instanceof HtmlOption) { final HtmlOption option = (HtmlOption) newNode; if (option.isSelected()) { getEnclosingSelect().setSelectedAttribute(option, true); } } }