Package com.gistlabs.mechanize

Examples of com.gistlabs.mechanize.PageRequest


    assertEquals("My Page", myPage.getTitle());
  }

  @Test
  public void testFollowingAnRelativeLinkWithContentLocationSetInHtmlResponseHeader() {
    PageRequest pageRequest = addPageRequest("http://test.com",
        newHtml("Test Page", "<a href=\"myPage.html\">myPage</a>"));
    pageRequest.setContentLocation("http://www1.test.com");
    addPageRequest("http://www1.test.com/myPage.html", newHtml("My Page", ""));
   
    AbstractDocument page = agent().get("http://test.com");
    Link link = page.links().find(contains("myPage"));
    assertNotNull(link);
View Full Code Here

TOP

Related Classes of com.gistlabs.mechanize.PageRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.