//webClient.waitForBackgroundJavaScriptStartingBefore(100000);
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
HtmlPage page = (HtmlPage) webClient.getPage("http://localhost:8080/store/store.html");
HtmlForm form = (HtmlForm) page.getFormByName("catalogForm");
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
}
HtmlCheckBoxInput catalogItems = (HtmlCheckBoxInput) form.getInputByName("items");
System.out.println(">>>" + catalogItems.getAttribute("value"));
Assert.assertEquals("Apple - $2.99", catalogItems.getAttribute("value"));
webClient.closeAllWindows();