public void testWithJavaScript() {
   selenium.setContext(
       "A real test, using the real Selenium on the browser side served by Jetty, driven from Java",
       SeleniumLogLevels.DEBUG);
   selenium.open("/selenium-server/tests/html/test_click_page1.html");
   assertTrue(
       "link 'link' doesn't contain expected text",
       selenium.getText("link").indexOf("Click here for next page") != -1);
   String[] links = selenium.getAllLinks();
   assertTrue(links.length > 3);
   assertEquals("linkToAnchorOnThisPage", links[3]);
   selenium.click("link");
   selenium.waitForPageToLoad("10000");
   assertTrue(
       selenium.getLocation().endsWith("/selenium-server/tests/html/test_click_page2.html"));
   selenium.click("previousPage");
   selenium.waitForPageToLoad("10000");
   assertTrue(
       selenium.getLocation().endsWith("/selenium-server/tests/html/test_click_page1.html"));
 }