org.encog.bot.browse
Class Browser

java.lang.Object
  extended by org.encog.bot.browse.Browser

public class Browser
extends Object

The main class for web browsing. This class allows you to navigate to a specific URL. Once you navigate to one URL, you can naviage to any URL contained on the page.

Author:
jheaton

Constructor Summary
Browser()
           
 
Method Summary
 WebPage getCurrentPage()
           
 void navigate(Form form)
          Navigate to the specified form by performing a submit of that form.
 void navigate(Form form, Input submit)
          Navigate based on a form.
 void navigate(Link link)
          Navigate to a new page based on a link.
 void navigate(String url)
          Navigate based on a string URL.
 void navigate(URL url)
          Navigate to a page based on a URL object.
 void navigate(URL url, InputStream is)
          Navigate to a page and post the specified data.
 void setCurrentPage(WebPage theCurrentPage)
          Set the current page.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Browser

public Browser()
Method Detail

getCurrentPage

public final WebPage getCurrentPage()
Returns:
The page currently being browsed.

navigate

public final void navigate(Form form)
Navigate to the specified form by performing a submit of that form.

Parameters:
form - The form to be submitted.

navigate

public final void navigate(Form form,
                           Input submit)
Navigate based on a form. Complete and post the form.

Parameters:
form - The form to be posted.
submit - The submit button on the form to simulate clicking.

navigate

public final void navigate(Link link)
Navigate to a new page based on a link.

Parameters:
link - The link to navigate to.

navigate

public final void navigate(String url)
Navigate based on a string URL.

Parameters:
url - The URL to navigate to.

navigate

public final void navigate(URL url)
Navigate to a page based on a URL object. This will be an HTTP GET operation.

Parameters:
url - The URL to navigate to.

navigate

public final void navigate(URL url,
                           InputStream is)
Navigate to a page and post the specified data.

Parameters:
url - The URL to post the data to.
is - The data to post to the page.

setCurrentPage

public final void setCurrentPage(WebPage theCurrentPage)
Set the current page.

Parameters:
theCurrentPage - The current page.

toString

public final String toString()

Overrides:
toString in class Object


Copyright © 2014. All Rights Reserved.