public Form check(String checkbox) {
   if (logger.isDebugEnabled()) {
     logger.debug("Checking " + checkbox);
   }
   HtmlCheckBoxInput chk = getCheckbox(checkbox);
   parent.setPage((HtmlPage) chk.setChecked(true));
   return this;
 }
 public void submit() {
   try {
     HtmlSubmitInput submit = form.getSubmitButton();
     if (submit != null) {
       if (logger.isDebugEnabled()) {
         logger.debug("Submiting " + form + " via submit button");
       }
       HtmlPage page = submit.click();
       parent.setPage(page);
     } else {
       if (logger.isDebugEnabled()) {
         logger.debug("Submiting " + form + " via javascript");
       }
       parent.setPage(form.submitJs());
     }
   } catch (IOException e) {
     throw new IllegalStateException("Error while submitting form", e);
   }
 }
 public void navigate(String element) {
   ClickableElement button = form.getInputByName(element);
   if (button == null) {
     if (logger.isDebugEnabled()) {
       logger.debug("Element " + element + " was not found by name, trying id");
     }
     button = form.getElementByIdOrDie(element);
   }
   try {
     parent.setPage((HtmlPage) button.click());
   } catch (IOException e) {
     throw new IllegalStateException(e);
   }
 }