/** * Submits the <code>Form</code> in the last rendered <code>Page</code>. * * @param path * path to <code>Form</code> component */ public void submitForm(String path) { Form<?> form = (Form<?>)getComponentFromLastRenderedPage(path); executeListener(form); }
/** * Submits the <code>Form</code> in the last rendered <code>Page</code>. * * @param path * path to <code>Form</code> component */ public void submitForm(String path) { Form form = (Form)getComponentFromLastRenderedPage(path); executeListener(form); }
/** * Renders a <code>Page</code> defined in <code>TestPageSource</code>. This is usually used when * a page does not have default constructor. For example, a <code>ViewBook</code> page requires * a <code>Book</code> instance: * * <pre> * tester.startPage(new TestPageSource() * { * public Page getTestPage() * { * Book mockBook = new Book("myBookName"); * return new ViewBook(mockBook); * } * }); * </pre> * * @param testPageSource * a <code>Page</code> factory that creates a test page instance * @return the rendered Page */ public final Page startPage(final ITestPageSource testPageSource) { startPage(DummyHomePage.class); DummyHomePage page = (DummyHomePage)getLastRenderedPage(); page.setTestPageSource(testPageSource); executeListener(page.getTestPageLink()); return getLastRenderedPage(); }
/** * Renders a <code>Page</code> defined in <code>TestPageSource</code>. This is usually used * when a page does not have default constructor. For example, a <code>ViewBook</code> page * requires a <code>Book</code> instance: * * <pre> * tester.startPage(new TestPageSource() * { * public Page getTestPage() * { * Book mockBook = new Book("myBookName"); * return new ViewBook(mockBook); * } * }); * </pre> * * @param testPageSource * a <code>Page</code> factory that creates a test page instance * @return the rendered Page */ public final Page startPage(final ITestPageSource testPageSource) { startPage(DummyHomePage.class); DummyHomePage page = (DummyHomePage)getLastRenderedPage(); page.setTestPageSource(testPageSource); executeListener(page.getTestPageLink()); return getLastRenderedPage(); }