public abstract class AbstractExecutor extends Object implements ActionExecutor
| Modifier and Type | Field and Description |
|---|---|
static Timeout |
MAX_ACTION_TIME
Default timeout for action run() method to be completed.
|
static String |
NON_QUEUE_ACTION_OUTPUT
Indentifies output which would be used to print information for all actions
executed not on event queue.
|
static String |
QUEUE_ACTION_OUTPUT
Indentifies output which would be used to print information for all actions
executed on event queue.
|
ACTION_EXECUTOR_PROPERTY| Constructor and Description |
|---|
AbstractExecutor() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
actionsInQueue() |
void |
execute(Environment env,
boolean dispatch,
Action action,
Object... parameters)
Schedules to execute an action and waits for it to finish.
|
void |
executeDetached(Environment env,
boolean dispatch,
Action action,
Object... parameters)
Schedules to execute an action and exits immediately.
|
abstract void |
executeQueue(Environment env,
Action action,
Object... parameters)
Schedules to execute an action through the UI system's dispatch thread and
waits for the action to be completed.
|
abstract void |
executeQueueDetached(Environment env,
Action action,
Object... parameters)
Schedules to execute an action through the UI system's dispatch thread and
exits immediately.
|
boolean |
isInAction()
Checks whether the current thread is already performing an action.
|
abstract boolean |
isOnQueue()
Checks whether this is invoked from the UI system event queue.
|
protected abstract boolean |
isQuiet()
Tells whether the UI is quiet which usually means that all scheduled
actions are dispatched and the queue is empty.
|
void |
waitQuiet(Timeout waitTime)
Waits for UI to became quiet which is determined using
isQuiet() method.
|
public static final Timeout MAX_ACTION_TIME
public static final String NON_QUEUE_ACTION_OUTPUT
public static final String QUEUE_ACTION_OUTPUT
protected int actionsInQueue()
public final void execute(Environment env, boolean dispatch, Action action, Object... parameters)
execute in interface ActionExecutorenv - Environment.dispatch - if true the action is executed on UI system dispatch
thread. This is usually necessary to invoke methods of the UI to get
the correct state or to update it.action - Action to execute.parameters - Parameters to pass to
action.run() method.TestOut.getOutput()public final void executeDetached(Environment env, boolean dispatch, Action action, Object... parameters)
executeDetached in interface ActionExecutorenv - Environment.dispatch - if true the action is executed on UI system dispatch
thread. This is usually necessary to invoke methods of the UI to get
the correct state or to update it.action - Action to execute.parameters - Parameters to pass to
action.run() method.TestOut.getOutput()public final boolean isInAction()
isInAction in interface ActionExecutorpublic abstract void executeQueue(Environment env, Action action, Object... parameters)
env - Environment.action - action to execute.parameters - parameters to pass to action.run() method.public abstract void executeQueueDetached(Environment env, Action action, Object... parameters)
env - Environment.action - action to execute.parameters - parameters to pass to action.run() method.public abstract boolean isOnQueue()
public void waitQuiet(Timeout waitTime)
waitQuiet in interface ActionExecutorwaitTime - maximum time for waiting.isQuiet()protected abstract boolean isQuiet()
waitQuiet(org.jemmy.env.Timeout)Copyright © 2018. All rights reserved.