public class ScriptedBrowser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BY_CLASSNAME |
static int |
BY_CSSSELECTOR |
static int |
BY_ID |
static int |
BY_LINKTEXT |
static int |
BY_NAME |
static int |
BY_PARTIALLINKTEXT |
static int |
BY_TAGNAME |
static int |
BY_XPATH |
static int |
FIND_CLICK |
static int |
FIND_SEND |
static int |
FIND2_CLICK |
static int |
GET |
static int |
GETSOURCE |
static int |
GETTITLE |
static int |
PAUSE |
protected java.lang.String |
uri |
static int |
WAIT_CLICK |
static int |
WAIT_FIND |
static int |
WAIT_SEND |
static int |
WAIT2_CLICK |
Constructor and Description |
---|
ScriptedBrowser(java.util.Map props)
create a new ScriptedBrowser
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.lang.String |
find2AndClick(int type,
java.lang.String text,
int type2,
java.lang.String text2,
long tm) |
java.lang.String |
findAndClick(int type,
java.lang.String text,
long tm) |
java.lang.String |
findAndSend(int type,
java.lang.String text,
java.lang.String key) |
java.lang.String |
get(java.lang.String url) |
java.lang.String |
getPageSource() |
java.lang.String |
getTitle() |
static void |
main(java.lang.String[] args)
tests ScripotedBrowser operations
|
static int |
parseOperation(java.lang.String str) |
static int |
parseType(java.lang.String str) |
java.lang.String |
waitAndClick(int type,
java.lang.String text,
int sec,
long tm) |
java.lang.String |
waitAndFind(int type,
java.lang.String text,
int sec,
long tm) |
java.lang.String |
waitAndFindClick(int type,
java.lang.String text,
int sec,
int type2,
java.lang.String text2,
long tm) |
java.lang.String |
waitAndSend(int type,
java.lang.String text,
int sec,
java.lang.String key) |
protected java.lang.String uri
public static final int BY_ID
public static final int BY_NAME
public static final int BY_TAGNAME
public static final int BY_LINKTEXT
public static final int BY_PARTIALLINKTEXT
public static final int BY_CLASSNAME
public static final int BY_CSSSELECTOR
public static final int BY_XPATH
public static final int GET
public static final int PAUSE
public static final int GETTITLE
public static final int GETSOURCE
public static final int FIND_SEND
public static final int FIND_CLICK
public static final int FIND2_CLICK
public static final int WAIT_CLICK
public static final int WAIT2_CLICK
public static final int WAIT_SEND
public static final int WAIT_FIND
public ScriptedBrowser(java.util.Map props)
public java.lang.String findAndClick(int type, java.lang.String text, long tm)
public java.lang.String find2AndClick(int type, java.lang.String text, int type2, java.lang.String text2, long tm)
public java.lang.String waitAndFind(int type, java.lang.String text, int sec, long tm)
public java.lang.String waitAndClick(int type, java.lang.String text, int sec, long tm)
public java.lang.String waitAndFindClick(int type, java.lang.String text, int sec, int type2, java.lang.String text2, long tm)
public java.lang.String findAndSend(int type, java.lang.String text, java.lang.String key)
public java.lang.String waitAndSend(int type, java.lang.String text, int sec, java.lang.String key)
public java.lang.String get(java.lang.String url)
public java.lang.String getTitle()
public java.lang.String getPageSource()
public void close()
public static int parseOperation(java.lang.String str)
public static int parseType(java.lang.String str)
public static void main(java.lang.String[] args)