public abstract class AbstractCommand extends Object implements ICommand
| Constructor and Description |
|---|
AbstractCommand(int index,
String name,
String[] args,
ArgumentType... argTypes)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addScreenshot(String path,
String label)
Add screenshot image.
|
String[] |
convertLocators(String[] args)
Deprecated.
|
Result |
execute(Context context,
String... curArgs)
Execute the command.
|
protected abstract Result |
executeImpl(Context context,
String... curArgs) |
Locator[] |
extractLocators(String[] args)
Extract locators from arguments.
|
String[] |
getArguments()
Get command arguments.
|
int |
getIndex()
Get index in selenese script file (1 origin).
|
String |
getName()
Get command name.
|
Result |
getResult()
Get the command result.
|
List<Screenshot> |
getScreenshots()
Get list of screenshot images.
|
String[] |
getSource()
Get source elements.
|
StartLoop |
getStartLoop()
Get beginning-of-loop command.
|
boolean |
mayUpdateScreen()
May the command update screen?
|
void |
setStartLoop(StartLoop startLoop)
Set beginning-of-loop command.
|
String |
toString() |
public AbstractCommand(int index,
String name,
String[] args,
ArgumentType... argTypes)
index - command index.name - command name.args - command args.argTypes - command argument types.public final String[] getSource()
ICommandpublic int getIndex()
ICommandpublic String[] getArguments()
ICommandgetArguments in interface ICommand@Deprecated public String[] convertLocators(String[] args)
ICommandconvertLocators in interface ICommandargs - the command arguments.public Locator[] extractLocators(String[] args)
ICommandextractLocators in interface ICommandargs - the command arguments.public boolean mayUpdateScreen()
ICommandmayUpdateScreen in interface ICommandpublic final Result execute(Context context, String... curArgs)
ICommandNote: set the command result to testCase in this method.
public Result getResult()
ICommandpublic void setStartLoop(StartLoop startLoop)
ICommandsetStartLoop in interface ICommandstartLoop - beginning-of-loop command.public StartLoop getStartLoop()
ICommandgetStartLoop in interface ICommandpublic void addScreenshot(String path, String label)
ICommandaddScreenshot in interface ICommandpath - image path.label - image label.public List<Screenshot> getScreenshots()
ICommandgetScreenshots in interface ICommandCopyright © 2017. All rights reserved.