Object getInternalValue() { return getValueAttribute(); }
/** * Creates an instance. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ public HtmlInput(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(namespaceURI, qualifiedName, page, attributes); defaultValue_ = getValueAttribute(); }
/** * Creates an instance. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ public HtmlInput(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(namespaceURI, qualifiedName, page, attributes); defaultValue_ = getValueAttribute(); }
/** * Creates an instance. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ public HtmlInput(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(namespaceURI, qualifiedName, page, attributes); defaultValue_ = getValueAttribute(); }
Object getInternalValue() { return getValueAttribute(); }
/** * Process {@link HtmlInput}. * * @param builder the StringBuilder to add to * @param htmlInput the target to process */ protected void appendInput(final StringBuilder builder, final HtmlInput htmlInput) { builder.append(htmlInput.getValueAttribute()); }
/** * Process {@link HtmlInput}. * * @param builder the StringBuilder to add to * @param htmlInput the target to process */ protected void appendInput(final StringBuilder builder, final HtmlInput htmlInput) { builder.append(htmlInput.getValueAttribute()); }
/** * Creates an instance. * * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ public HtmlInput(final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(qualifiedName, page, attributes); defaultValue_ = getValueAttribute(); originalName_ = getNameAttribute(); }
public static String findHidden(HtmlElement elem, String n) { List<HtmlElement> test = elem.getElementsByAttribute("input", "name", n); if (!test.isEmpty()) { HtmlInput i = (HtmlInput) test.get(0); String v = i.getValueAttribute(); if (v != null && v.length() > 0) return v; } return null; }
/** * Creates an instance. * * @param qualifiedName the qualified name of the element type to instantiate * @param page the page that contains this element * @param attributes the initial attributes */ public HtmlInput(final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(qualifiedName, page, attributes); defaultValue_ = getValueAttribute(); originalName_ = getNameAttribute(); }
/** * Verifies that the input element with the specified name on the specified page contains the * specified value. * * @param page the page to check * @param name the name of the input element to check * @param value the value to check for */ public static void assertInputContainsValue(final HtmlPage page, final String name, final String value) { final String xpath = "//input[@name='" + name + "']"; final List<?> list = page.getByXPath(xpath); if (list.isEmpty()) { throw new AssertionError("Unable to find an input element named '" + name + "'."); } final HtmlInput input = (HtmlInput) list.get(0); final String s = input.getValueAttribute(); if (!s.equals(value)) { throw new AssertionError("The input element named '" + name + "' contains the value '" + s + "', not the expected value '" + value + "'."); } }
/** * Verifies that the input element with the specified name on the specified page does not * contain the specified value. * * @param page the page to check * @param name the name of the input element to check * @param value the value to check for */ public static void assertInputDoesNotContainValue(final HtmlPage page, final String name, final String value) { final String xpath = "//input[@name='" + name + "']"; final List<?> list = page.getByXPath(xpath); if (list.isEmpty()) { throw new AssertionError("Unable to find an input element named '" + name + "'."); } final HtmlInput input = (HtmlInput) list.get(0); final String s = input.getValueAttribute(); if (s.equals(value)) { throw new AssertionError("The input element named '" + name + "' contains the value '" + s + "', not the expected value '" + value + "'."); } }
/** * Verifies that the input element with the specified name on the specified page does not * contain the specified value. * * @param page the page to check * @param name the name of the input element to check * @param value the value to check for */ public static void assertInputDoesNotContainValue(final HtmlPage page, final String name, final String value) { final String xpath = "//input[@name='" + name + "']"; final List<?> list = page.getByXPath(xpath); if (list.isEmpty()) { throw new AssertionError("Unable to find an input element named '" + name + "'."); } final HtmlInput input = (HtmlInput) list.get(0); final String s = input.getValueAttribute(); if (s.equals(value)) { throw new AssertionError("The input element named '" + name + "' contains the value '" + s + "', not the expected value '" + value + "'."); } }
/** * Verifies that the input element with the specified name on the specified page does not * contain the specified value. * * @param page the page to check * @param name the name of the input element to check * @param value the value to check for */ public static void assertInputDoesNotContainValue(final HtmlPage page, final String name, final String value) { final String xpath = "//input[@name='" + name + "']"; final List< ? > list = page.getByXPath(xpath); if (list.isEmpty()) { throw new AssertionError("Unable to find an input element named '" + name + "'."); } final HtmlInput input = (HtmlInput) list.get(0); final String s = input.getValueAttribute(); if (s.equals(value)) { throw new AssertionError("The input element named '" + name + "' contains the value '" + s + "', not the expected value '" + value + "'."); } }
/** * {@inheritDoc} */ @Override public NameValuePair[] getSubmitNameValuePairs() { return new NameValuePair[]{new NameValuePair(getNameAttribute(), getValueAttribute())}; }
/** * {@inheritDoc} */ @Override public NameValuePair[] getSubmitNameValuePairs() { return new NameValuePair[]{new NameValuePair(getNameAttribute(), getValueAttribute())}; }
/** * {@inheritDoc} */ public NameValuePair[] getSubmitKeyValuePairs() { return new NameValuePair[]{new NameValuePair(getNameAttribute(), getValueAttribute())}; }
/** * {@inheritDoc} */ public NameValuePair[] getSubmitKeyValuePairs() { return new NameValuePair[]{new NameValuePair(getNameAttribute(), getValueAttribute())}; }
/** * {@inheritDoc} */ public NameValuePair[] getSubmitKeyValuePairs() { return new NameValuePair[]{new NameValuePair(getNameAttribute(), getValueAttribute())}; }
private HtmlPage submitNewRepositoryForm(HtmlPage page) throws IOException { for (HtmlForm form : page.getForms()) { for (HtmlInput mode : form.getInputsByName("mode")) { if ("new".equals(mode.getValueAttribute())) { for (HtmlInput home : form.getInputsByName("repository_home")) { home.setValueAttribute("target/repository"); for (HtmlElement submit : form.getElementsByAttribute("input", "type", "submit")) { return submit.click(); } } } } } fail(); return null; }