public void execute() throws IOException { getHtmlForm().submit((SubmittableElement) null); } };
public void execute() throws IOException { getHtmlForm().submit((SubmittableElement) null); } };
public void execute() throws IOException { getHtmlForm().submit((SubmittableElement) null); } };
/** * Submit this form as if the first <input type="submit" button in the form was clicked. * * @see #submit(SubmittableElement) */ public Page submit() throws IOException { return submit(getSubmitButton()); }
/** * Submit this form as if the first <input type="submit" button in the form was clicked. * * @see #submit(SubmittableElement) */ public Page submit() throws IOException { return submit(getSubmitButton()); }
/** * Submits the form. * * Plain {@link HtmlForm#submit()} doesn't work correctly due to the use of * YUI in Hudson. */ public HtmlPage submit(HtmlForm form) throws Exception { List<HtmlButton> buttons = form.getHtmlElementsByTagName("button"); if ((buttons != null) && (buttons.size() > 0)) { HtmlButton button = (HtmlButton) last(form.getHtmlElementsByTagName("button")); return (HtmlPage) form.submit(button); } else { return (HtmlPage) form.submit(); } }
/** * Submits the form. * * Plain {@link HtmlForm#submit()} doesn't work correctly due to the use of YUI in Hudson. */ public HtmlPage submit(HtmlForm form) throws Exception { return (HtmlPage)form.submit((HtmlButton)last(form.getHtmlElementsByTagName("button"))); }
/** * {@inheritDoc} */ @Override protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey) throws IOException { final HtmlForm form = getEnclosingForm(); if (form != null) { form.submit(this); return false; } super.doClickStateUpdate(shiftKey, ctrlKey); return false; }
/** * Submits the form. * * Plain {@link HtmlForm#submit()} doesn't work correctly due to the use of YUI in Hudson. */ public HtmlPage submit(HtmlForm form) throws Exception { return (HtmlPage)form.submit((HtmlButton)last(form.getHtmlElementsByTagName("button"))); }
/** * {@inheritDoc} */ @Override protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey) throws IOException { final HtmlForm form = getEnclosingForm(); if (form != null) { form.submit(this); return false; } super.doClickStateUpdate(shiftKey, ctrlKey); return false; }
/** * {@inheritDoc} * @throws IOException if an IO error occurred */ @Override protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey) throws IOException { final HtmlForm form = getEnclosingForm(); if (form != null) { form.submit(this); return false; } super.doClickStateUpdate(shiftKey, ctrlKey); return false; }
/** * {@inheritDoc} */ @Override protected Page doClickAction(final Page defaultPage) throws IOException { final String type = getTypeAttribute().toLowerCase(); final HtmlForm form = getEnclosingForm(); if (form != null) { if (type.equals("submit")) { return form.submit(this); } else if (type.equals("reset")) { return form.reset(); } } return defaultPage; }
/** * {@inheritDoc} * @throws IOException if an IO error occurred */ @Override protected boolean doClickStateUpdate(final boolean shiftKey, final boolean ctrlKey) throws IOException { final HtmlForm form = getEnclosingForm(); if (form != null) { form.submit(this); return false; } super.doClickStateUpdate(shiftKey, ctrlKey); return false; }
public HtmlPage search(String q) throws IOException, SAXException { HtmlPage top = goTo(""); HtmlForm search = top.getFormByName("search"); search.getInputByName("q").setValueAttribute(q); return (HtmlPage)search.submit(null); }
public HtmlPage search(String q) throws IOException, SAXException { HtmlPage top = goTo(""); HtmlForm search = top.getFormByName("search"); search.getInputByName("q").setValueAttribute(q); return (HtmlPage)search.submit(null); }
public HtmlPage search(String q) throws IOException, SAXException { HtmlPage top = goTo(""); HtmlForm search = top.getFormByName("search"); search.getInputByName("q").setValueAttribute(q); return (HtmlPage) search.submit(null); }
/** * Logs in to Hudson. */ public WebClient login(String username, String password) 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); form.submit(null); return this; }
/** * Logs in to Hudson. */ public WebClient login(String username, String password) 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); form.submit(null); return this; }
/** * Logs in to Hudson. */ public WebClient login(String username, String password) 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); form.submit(null); return this; }
public void testMainFeature() throws Exception { WebClient wc = new WebClient(); HtmlPage page = wc.getPage(new URL(url, "/form.html")); HtmlForm f = page.getFormByName("main"); f.getInputByName("json").setValueAttribute("{\"first\":\"Kohsuke\",\"last\":\"Kawaguchi\"}"); f.submit(); }