org.encog.bot.browse.range
Class Form

java.lang.Object
  extended by org.encog.bot.browse.range.DocumentRange
      extended by org.encog.bot.browse.range.Form

public class Form
extends DocumentRange

A document range that represents a form, and all embedded tags.

Author:
jheaton

Nested Class Summary
static class Form.Method
          The method for this form.
 
Constructor Summary
Form(WebPage source)
          Construct a form on the specified web page.
 
Method Summary
 Input findType(String type, int index)
          Find the form input by type.
 Address getAction()
           
 Form.Method getMethod()
           
 void setAction(Address action)
          Set the action for the form.
 void setMethod(Form.Method method)
          Set the method to send the form.
 String toString()
          
 
Methods inherited from class org.encog.bot.browse.range.DocumentRange
addElement, getBegin, getClassAttribute, getElements, getEnd, getIdAttribute, getParent, getSource, getTextOnly, setBegin, setClassAttribute, setEnd, setIdAttribute, setParent, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Form

public Form(WebPage source)
Construct a form on the specified web page.

Parameters:
source - The web page that contains this form.
Method Detail

findType

public Input findType(String type,
                      int index)
Find the form input by type.

Parameters:
type - The type of input we want.
index - The index to begin searching at.
Returns:
The Input object that was found.

getAction

public Address getAction()
Returns:
The URL to send the form to.

getMethod

public Form.Method getMethod()
Returns:
How the form will be sent.

setAction

public void setAction(Address action)
Set the action for the form.

Parameters:
action - The URL to send the form to.

setMethod

public void setMethod(Form.Method method)
Set the method to send the form.

Parameters:
method - How to send the form.

toString

public String toString()

Overrides:
toString in class DocumentRange


Copyright © 2011. All Rights Reserved.