Package | Description |
---|---|
com.jaunt |
Jaunt [website] is a web-scraping & automation library that provides a lightweight HTTP useragent (headless browser), including JSON parser.
|
com.jaunt.component |
Modifier and Type | Method and Description |
---|---|
Document |
Document.choose(short labelPosition,
String labelRegex)
Deprecated.
|
Document |
Document.choose(String menuLabel,
String menuItemRegex)
Deprecated.
|
Document |
Document.chooseCheckBox(String labelRegex,
short labelPosition)
Selects the checkbox who's label is matched by the specified (case-insensitive) regular expression.
|
Document |
Document.chooseMenuItem(String menuLabel,
String menuItemRegex)
Completes the menu that has the specified text label (case insensitive, wordspace insensitive) by selecting the menuitem(s) that matches the specified (case insensitive) regular expression (using Matcher.matches).
|
Document |
Document.chooseRadioButton(String labelRegex,
short labelPosition)
Selects the radiobutton who's label is matched by the specified (case-insensitive) regular expression.
|
Document |
Document.fillout(String label,
String value)
Deprecated.
|
Document |
Document.filloutField(String label,
String value)
Fills the textfield, password field, or textarea field that has the specified text label (case-insensitive, wordspace-insensitive) with the specified value.
|
JNode |
JNode.findEach(String query)
Searches descendant nodes and returns a JNodes container that holds all
JNodes matching the query, not including those nodes that are descendants
of any matching nodes (ie, excludes nested matches); returns an empty JNodes
container if no matching JNodes were found or if the method is invoked on a leaf node.
|
JNode |
JNode.findEvery(String query)
Searches descendant nodes and returns a JNodes container that holds all
JNodes matching the query; returns an empty JNodes container if no matching
JNodes were found or if the method is invoked on a leaf node.
|
Comment |
Element.findFirst(short commentType)
Searches all children/descendants and returns the first Comment matching the specified Comment type constant (CDATA sections, processing instructions, and DOCTYPE definitions are treated as types of Comment).
|
JNode |
JNode.findFirst(String query)
Searches descendant nodes and retrieves the first
JNode that matches the specified query, or throws a NotFound Exception if
no matching JNode is found; throws a NotFound Exception if
no matching JNode is found, or if this method is invoked on a leaf node.
|
Element |
Element.findFirst(String query)
Searches all child/descendant elements and retrieves the first one found to match the query.
|
Element |
Element.findNearestAncestor(String tagNameRegex)
Finds the nearest ancestor Element (working upwards from the current Element) whose tagname matches the specified case insensitive regular expression (using Matcher.matches()).
|
JNode |
JNode.get(int index)
Returns the JNode at the specified position or throws a NotFound Exception if the specified position is out of bounds.
|
JNode |
JNode.get(String name)
Returns the child node associated with the specified name or throws a NotFound Exception if the name does not exist as a key; if the specified name is associated with the value null, then a JNode of Type.UNDEFINED is returned.
|
String |
Element.getAt(String attributeName)
Returns the attribute value for the specified attributeName, or throws a NotFound Exception if the attribute name or attribute value is not found.
|
Comment |
Element.getComment(int n)
Retrieves the nth child Comment (CDATA sections, processing instructions, and DOCTYPE definitions are treated as types of Comment).
|
JNode |
JNode.getEach(String query)
Searches only child nodes (not all descendants) and returns a JNodes
container that holds all JNodes matching the query; returns an empty JNodes container
if no matching JNodes were found or if the method is invoked on a leaf node.
|
Element |
Element.getElement(int n)
Retrieves the nth child Element or throws a NotFound Exception if no element exists at the specified position.
|
Comment |
Element.getFirst(short commentType)
Searches only children (not all descendants) and returns the first Comment matching the specified Comment type constant (CDATA sections, processing instructions, and DOCTYPE definitions are treated as types of Comment).
|
JNode |
JNode.getFirst(String query)
Searches only child nodes (not all descendants) and retrieves the first
JNode that matches the specified query; throws a NotFound Exception if
no matching JNode is found, or if this method is invoked on a leaf node.
|
Element |
Element.getFirst(String query)
Searches only child elements (not all descendants) and retrieves the first child element that was found to match the query.
|
Form |
Document.getForm(Element element)
Returns the Form for the specified form Element or throws a NotFound Exception.
|
Form |
Document.getForm(String elementQuery)
Returns a Form object for the first form Element that matches the specified elementQuery (or throws a NotFound Exception).
|
Form |
Document.getFormByButton(String buttonLabelRegex)
Returns a Form object for the first form Element containing a button who's text/values is matched (case insensitive) by the specified regular expression (using Matcher.matches()), or throws a NotFound Exception.
|
Form |
Document.getFormByButtons(String[] buttonLabelRegexs)
Returns a Form object for the first form Element containing buttons who's text/values are matched (case insensitive) by the regular expressions in the specified array (using Matcher.matches()), or throws a NotFound Exception.
|
com.jaunt.component.Hyperlink |
Document.getHyperlink(String linkRegex)
Returns the first hyperlink who's element has innerText (from
Element.innerText() ) matching the specified (case insensitive) regular expression (using Matcher.matches). |
com.jaunt.component.Table |
Document.getTable(Element tableElement)
Returns a Table component for the specified table Element or throws a NotFound exception if the specified element is not a table.
|
com.jaunt.component.Table |
Document.getTable(int n)
Returns a Table component representing the nth non-nested table Element in the document, or throws a NotFound exception if no table element is found.
|
com.jaunt.component.Table |
Document.getTable(String elementQuery)
Returns a Table component for the first table Element that matches the specified elementQuery (or throws a NotFound Exception).
|
com.jaunt.component.Hyperlink |
Document.nextPageLink()
returns the next hyperlink in a series of numeric links within the document, such as links that represent pages of search results; throws exceptions if no sequences or multiple (non-equivalent) sequences were found.
|
com.jaunt.component.Hyperlink |
Document.nextPageLink(Element container)
returns the next hyperlink in a series of numeric links within the specified container, such as links that represent pages of search results; throws exceptions if no sequences or multiple (non-equivalent) sequences were found.
|
Element |
Element.nextSiblingElement()
Retrieves the next sibling Element in the DOM (ie, the next Element that shares the same parent); note that this method is not suitable for iterating through the children of an Elements container, since the those elements may not be siblings in the dom tree.
|
Document |
Document.unchoose(short labelPosition,
String labelRegex)
Deprecated.
|
Document |
Document.unchooseCheckBox(String labelRegex,
short labelPosition)
Deselects the checkbox who's label is matched by the specified (case-insensitive) regular expression.
|
Document |
Document.unchooseRadioButton(String labelRegex,
short labelPosition)
Deselects the radiobutton who's label is matched by the specified (case-insensitive) regular expression.
|
Constructor and Description |
---|
Element(String markup)
Constructs an Element (as well as child/descendant nodes) that represents the specified HTML/XHTML/XML markup; if the specified markup consists of multiple elements at the topmost level, all but the first are ignored.
|
Modifier and Type | Method and Description |
---|---|
Form |
Form.choose(short labelPosition,
String label)
Deprecated.
|
Form |
Form.choose(String menuLabel,
String menuItemRegex)
Deprecated.
use
Form.chooseMenuItem(String,String) instead. |
Form |
Form.chooseCheckBox(String label,
short labelPosition)
Selects the checkbox with the specified (case-insensitive, wordspace-insensitive) text label.
|
Form |
Form.chooseMenuItem(String menuLabel,
String menuItemRegex)
Completes the menu that has the specified text label (case insensitive, wordspace insensitive) by selecting the menuitem(s) that matches the specified (case insensitive) regular expression (using Matcher.matches).
|
Form |
Form.chooseRadioButton(String label,
short labelPosition)
Selects the radiobutton with the specified (case-insensitive, wordspace-insensitive) text label.
|
Form |
Form.fillout(String label,
String value)
Deprecated.
use
Form.filloutField(String,String) instead. |
Form |
Form.filloutField(String label,
String value)
Fills the textfield, password field, or textarea field that has the specified text label (case-insensitive, wordspace-insensitive) with the specified value.
|
HttpRequest |
Form.getRequest(int submitButtonIndex)
Returns an HttpRequest object corresponding to a form submission made by pressing the submit button specified by its index, with indexing starting at 0 for the first submit button, throwing a NotFound Exception if the specified submitButton is not found, or returns null if this form has no (implicit or explicit) action.
|
HttpRequest |
Form.getRequest(Pattern submitLabelPattern)
Returns the HttpRequest object corresponding to a form submission made by pressing the first submit button who's label matches the specified (case insensitive) regular expression Pattern (using Matcher.matches), or returns null if this form has no (implicit or explicit) action.
|
HttpRequest |
Form.getRequest(String submitButtonRegex)
Returns the HttpRequest object corresponding to a form submission made by pressing the first submit button who's label matches the specified (case insensitive) regular expression (using Matcher.matches), or returns null if this form has no (implicit or explicit) action.
|
List<HttpRequest> |
Form.getRequestPermutations(String submitLabelRegex)
Generates a list of HttpRequests that represent all the requests made by permuting tagged components through their values.
|
Form |
Form.set(String name,
String value)
Sets the form input with the specified name to the specified value; FileComponents are set to upload the file who's location is specified by the specified value;
Checkboxes are 'checked' if the specified value is the same (case insensitive) as the value attribute of the checkbox (or if the specified value is "on" in cases where the checkbox has no value attribute).
|
Form |
Form.setCheckBox(String name,
boolean checked)
Sets whether the first checkbox with the specified (case-insensitive) name is checked and throws an Exception if the checkbox was not found.
|
Form |
Form.setFile(String name,
File file)
Sets the first FileComponent with the specified (case insensitive) name to upload the specified File and throws an Exception if no FileComponent with specified name was found.
|
Form |
Form.setHidden(String name,
String value)
Sets the first hidden field with the specified (case insensitive) name to the specified value and throws an Exception if no field with specified name exists.
|
Form |
Form.setPassword(String name,
String value)
Sets the first password field with the specified (case insensitive) name to the specified value and throws an Exception if no field with specified name exists.
|
Form |
Form.setRadio(String name,
int n)
Sets the radiobutton at index n and with the specified name to be 'checked' and
deselects all onther radiobuttons with the same name, throwing an exception if no such radiobutton exists.
|
Form |
Form.setRadio(String name,
String value)
Sets the radiobutton with the specified (case insensitive) name and
(case insensitive) value to 'checked' and deselects all other radiobuttons
with the same name.
|
Form |
Form.setSelect(String name,
int n)
Sets the nth menu option with the specified (case insensitive) name to 'selected',
and deselects all other options in the same select tag, throwing an Exception if no such menu option was found.
|
Form |
Form.setSelect(String name,
String value)
Sets the first menu option with specified (case insensitive) name and (case insensitive) value to 'selected' and
deselects all other options in the same select tag if the select tag does
not have 'multiple' keyword; throws an Exception if no such menu option exists.
|
Form |
Form.setTextArea(String name,
String value)
Sets the textarea with specified (case insensitive) name to the specified value and throws an Exception if no such button exists.
|
Form |
Form.setTextField(String name,
String value)
Sets the first textfield with the specified (case insensitive) name to the specified value and throws an Exception if no field with specified name was found.
|
Document |
Form.submit(int submitButtonIndex)
Submits the the form by pressing the submit button specified by its index, with indexing starting at 0 for the first submit button, throwing a NotFound Exception if the specified submitButton is not found.
|
Form |
Form.unchoose(short labelPosition,
String label)
Deprecated.
|
Form |
Form.unchooseCheckBox(String label,
short labelPosition)
Unchecks the checkbox with the specified (case-insensitive, wordspace-insensitive) label.
|
Form |
Form.unchooseRadioButton(String label,
short labelPosition)
Unchecks the radiobutton with the specified (case-insensitive, wordspace-insensitive) label.
|