[Httpunit-commit] CVS: httpunit/doc/manual retrieving.html,NONE,1.1 manual.css,1.1,1.2 toc.html,1.1,
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-02-20 20:51:25
|
Update of /cvsroot/httpunit/httpunit/doc/manual In directory sc8-pr-cvs1:/tmp/cvs-serv21599/doc/manual Modified Files: manual.css toc.html Added Files: retrieving.html Log Message: Initial documentation of retrieving a URL --- NEW FILE --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>HttpUnit Manual - Retrieving Web Pages</title> <LINK REL="stylesheet" HREF="manual.css" TYPE="text/css"> </head> <body> <h1>Retrieving Web Pages</h1> <h2>Explicit Specification of a Page URL</h2> <p>The very first step in any interaction with a web site is to obtain a start page. To do this, we create a <a href="../api/com/meterware/httpunit/WebConversation.html"><span class="code">WebConversation</span></a> object to play the role of the web browser. This object will store browser state such a cookies, windows, and so on. We then ask for the page by specifying the desired URL:</p> <pre class="code-example"> WebConversation wc = <b>new</b> WebConversation(); WebResponse wr = wc.getResponse( "http://www.meterware.com" ); System.out.println( wr.getText() ); </pre> This example will simply print out the text of the retrieved page. Obviously, given this text, it is easy to search for particular strings on the page, if that is desired. Index: manual.css =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/manual/manual.css,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- manual.css 26 Nov 2002 13:00:57 -0000 1.1 +++ manual.css 20 Feb 2003 20:51:19 -0000 1.2 @@ -4,3 +4,14 @@ H2 { padding-left: .5em; padding-top: .5em; padding-bottom: .5 em; margin-bottom: 1em; background-color: #e3e3e3; border-color: #000000; border-width: 2; border-style: solid } + +SPAN.code { font-family: courier, monospaced, sans-serif } + +PRE { font-family: "courier new", courier; font-size: 8pt; + margin-left: 2%; margin-right: 2%; + padding-top: .5em; padding-bottom: .5em; padding-right: .5em; padding-left: .5em; + border-color: black; border-width: 2; border-style: solid } + +PRE.code-examples { background-color: #cccccc } + + Index: toc.html =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/manual/toc.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- toc.html 4 Dec 2002 02:51:05 -0000 1.1 +++ toc.html 20 Feb 2003 20:51:19 -0000 1.2 @@ -11,7 +11,7 @@ <h3>1. Getting Started</h3> <a href="introduction.html">Introduction</a><br> <a href="installing.html">Installing HttpUnit</a><br> -<a href="retrieving.html">Retrieving a page from a URL</a><br> +<a href="retrieving.html">Retrieving Web Pages</a><br> <br><a href="section2.html" class="toc-section">Working with Links and Forms</a><br> <br><a href="section3.html" class="toc-section">Deciphering Tables</a><br> <br><a href="section4.html" class="toc-section">Handling Frame structure</a><br> |