|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Robot
de.cbse.jeasy.JEAutomation
public class JEAutomation
The JEAutomation offers a script interface for the java robot class in XML format.
For more informations see the Robot class of the jdk. Example:
<?xml version='1.0' ?> <jeasy> <automationScript id="test1"> <automation method="setDelayFactor" param1="1"/> <automation method="smoothMouse" param1="true"/> <automation method="mouseMove" param1="RB_Radio1"/> <automation method="mouseClickLeft"/> <automation method="mouseMove" param1="BT_Button"/> <automation method="mouseClickLeft"/> <automation method="mouseMove" param1="DF_Datafield"/> <automation method="mouseClickLeft"/> <automation method="typeString" param1="azAZ1234567890"/> <automation method="setValue" param1="DF_Datafield" param2="azAZ1234567890"/> <automation method="mouseMove" param1="CB_Combobox"/> <automation method="mouseClickLeft"/> <methodinvocation> <id>MC_DB_Country1</id> <JEObject>CB_Combobox</JEObject> <method>setSelectedIndex(int)</method> <param1Class>int</param1Class> <param1Value>5</param1Value> </methodinvocation> </automationScript> </jeasy>The following methods are defined in JEasy script language:
| Field Summary | |
|---|---|
(package private) JENode |
automate
|
(package private) java.io.BufferedReader |
br
|
(package private) java.lang.Object |
caller
|
(package private) java.awt.Component |
co
|
(package private) int |
delayFactor
|
(package private) int |
mousex
|
(package private) int |
mousey
|
(package private) java.awt.Point |
p
|
(package private) java.awt.Robot |
robot
|
(package private) javax.swing.JRootPane |
rootPane
|
(package private) boolean |
smoothMouse
|
| Constructor Summary | |
|---|---|
JEAutomation()
|
|
JEAutomation(java.lang.Object caller)
|
|
| Method Summary | |
|---|---|
void |
automate(java.lang.String xmlAutomate)
Call this method directly to perform the automation not using a thread. |
void |
automateAsThread(JENode xmlAutomate)
Performs one XML automation tag as a thread Example: <automation method="mouseMove" param1="RB_Radio1"/> |
void |
doXMLScript(java.io.BufferedReader din)
Reads the automation tags out of the BufferedReader and performs them. |
void |
mouseClickLeft()
Presses and releases the left mouse button with an delay of 300 ms. |
void |
mouseClickRight()
Presses and releases the righ mouse button with an delay of 300 ms. |
void |
mouseMove(int fromx,
int fromy,
int tox,
int toy)
Moves the mouse smoothly. |
void |
mouseMove(java.lang.String JEObjectId)
Move the mouse to the middle of the JEasy object. |
void |
mouseMove(java.lang.String JEObjectId,
int row,
int col)
Move the mouse to the table to row and column. |
void |
mouseMove(java.lang.String JEObjectId,
int colLookUp,
java.lang.String search,
int column)
Move the mouse to the table to row (where saerch is found in col colLookUp) and column. |
void |
run()
Call this method directly to perform the automation not as a thread. |
void |
setDelayFactor(int delayFact)
A value between 1 and 10 which is a multiplier of 10 ms for the autoDelay() |
void |
setValue(java.lang.String JEObjectId,
java.lang.String text)
Sets the text of a jeasy input component. |
void |
typeString(java.lang.String s)
Generates keyPress and KeyRelease events related to the given string. |
| Methods inherited from class java.awt.Robot |
|---|
createScreenCapture, delay, getAutoDelay, getPixelColor, isAutoWaitForIdle, keyPress, keyRelease, mouseMove, mousePress, mouseRelease, mouseWheel, setAutoDelay, setAutoWaitForIdle, toString, waitForIdle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
java.awt.Robot robot
java.awt.Point p
JENode automate
java.io.BufferedReader br
int delayFactor
int mousex
int mousey
boolean smoothMouse
java.lang.Object caller
javax.swing.JRootPane rootPane
java.awt.Component co
| Constructor Detail |
|---|
public JEAutomation()
throws java.awt.AWTException
java.awt.AWTException
public JEAutomation(java.lang.Object caller)
throws java.awt.AWTException
java.awt.AWTException| Method Detail |
|---|
public void automateAsThread(JENode xmlAutomate)
s - XML StringJE#PropertyStringpublic void run()
run in interface java.lang.Runnable
public void automate(java.lang.String xmlAutomate)
throws java.io.IOException
java.io.IOExceptionpublic void mouseClickLeft()
public void mouseClickRight()
public void setDelayFactor(int delayFact)
public void doXMLScript(java.io.BufferedReader din)
throws java.io.IOException
java.io.IOExceptionpublic void mouseMove(java.lang.String JEObjectId)
public void mouseMove(java.lang.String JEObjectId,
int row,
int col)
public void mouseMove(java.lang.String JEObjectId,
int colLookUp,
java.lang.String search,
int column)
JEObjectId - colLookUp - search - col -
public void mouseMove(int fromx,
int fromy,
int tox,
int toy)
public void setValue(java.lang.String JEObjectId,
java.lang.String text)
public void typeString(java.lang.String s)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||