public void update(WebForm form) { final String field = "status_whiteboard"; String value = form.getParameterValue(field); form.setParameter(field, (value == null ? words : value + " " + words)); } });
protected String scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(_getURL()+"/servlets/ProjectEdit"); WebForm form = Util.getFormWithAction(response,"ProjectEdit"); return form.getParameterValue("status"); } }.run();
protected String scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(_getURL()+"/servlets/ProjectEdit"); WebForm form = Util.getFormWithAction(response,"ProjectEdit"); String old = form.getParameterValue("status"); form.setParameter("status",msg); checkError(form.submit()); return old; } }.run();
protected Void scrape() throws IOException, SAXException, ProcessingException { WebResponse response = goTo(project._getURL()+"/servlets/ProjectMailingListList"); for (WebForm form : response.getForms()) { if(!form.getAction().equals("ProjectMailingListList")) continue; if(!form.getParameterValue("listName").equals(name)) continue; // found the form SubmitButton sb = form.getSubmitButtons()[0]; if(!sb.getValue().equals("Subscribe")) throw new ProcessingException("Found "+sb.getValue()+" but expected Subscribe"); // set the mode form.setParameter("subtype",mode.getNameAsWord()); checkError(form.submit(sb)); return null; } throw new ProcessingException("no subscription form found"); } }.run();