AbstractCommand.@Deprecated public abstract class Command extends Object implements ICommand
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
args
Deprecated.
|
protected String[] |
locators
Deprecated.
|
protected String |
name
Deprecated.
|
| Constructor and Description |
|---|
Command(int index,
String name,
String[] args,
int argCnt)
Deprecated.
Constructor.
|
Command(int index,
String name,
String[] args,
int argCnt,
int[] locatorIndexes)
Deprecated.
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addScreenshot(String path,
String label)
Deprecated.
Add screenshot image.
|
boolean |
canUpdate()
Deprecated.
Can this command update screen?
|
String[] |
convertLocators(String[] args)
Deprecated.
Convert locators from arguments.
|
Result |
doCommand(TestCase testCase,
Runner runner)
Deprecated.
Execute selenese command.
|
protected Result |
doCommandImpl(TestCase testCase,
Runner runner)
Deprecated.
Implementation of command.
|
Result |
execute(Context context,
String... curArgs)
Deprecated.
Execute the command.
|
String[] |
getArguments()
Deprecated.
Get command arguments.
|
int |
getIndex()
Deprecated.
Get index in selenese script file (1 origin).
|
String[] |
getLocators()
Deprecated.
Get locators of command.
|
String |
getName()
Deprecated.
Get command name.
|
Result |
getResult()
Deprecated.
Get result of this command.
|
List<Screenshot> |
getScreenshots()
Deprecated.
Get list of screenshot images.
|
String[] |
getSource()
Deprecated.
Get source elements.
|
StartLoop |
getStartLoop()
Deprecated.
Get beginning-of-loop command.
|
boolean |
hasResult()
Deprecated.
Has this command result?
|
boolean |
mayUpdateScreen()
Deprecated.
May the command update screen?
|
Command |
next(TestCase testCase)
Deprecated.
|
protected Result |
setResult(Result result)
Deprecated.
Set result of this command.
|
void |
setStartLoop(StartLoop startLoop)
Deprecated.
Set beginning-of-loop command.
|
String |
toString()
Deprecated.
|
protected final String name
protected final String[] args
protected final String[] locators
public Command(int index,
String name,
String[] args,
int argCnt,
int[] locatorIndexes)
index - index number of Command. (1 origin)name - selenese command name.args - command arguments.argCnt - argument count. (less than or equals to args.length)locatorIndexes - locator indexes. (0 origin. use NO_LOCATOR_INDEX if no locator)public Command(int index,
String name,
String[] args,
int argCnt)
index - index number of Command. (1 origin)name - selenese command name.args - command arguments.argCnt - argument count. (less than or equals to args.length)public boolean hasResult()
For example, "echo" and "comment" have no result.
public boolean canUpdate()
public final int getIndex()
public String getName()
ICommandpublic String[] getLocators()
public final Result getResult()
protected final Result setResult(Result result)
result - result of this command.public final String[] getSource()
protected Result doCommandImpl(TestCase testCase, Runner runner)
testCase - test-case instance.runner - Runner object.public final Result doCommand(TestCase testCase, Runner runner)
testCase - test-case instatnce.runner - Runner object.@Deprecated public Command next(TestCase testCase)
testCase - test-case instance.public void setStartLoop(StartLoop startLoop)
ICommandsetStartLoop in interface ICommandstartLoop - beginning-of-loop command.public StartLoop getStartLoop()
ICommandgetStartLoop in interface ICommandpublic boolean mayUpdateScreen()
ICommandmayUpdateScreen in interface ICommandpublic String[] getArguments()
ICommandgetArguments in interface ICommandpublic String[] convertLocators(String[] args)
ICommandconvertLocators in interface ICommandargs - the command arguments.public final Result execute(Context context, String... curArgs)
ICommandNote: set the command result to testCase in this method.
public void addScreenshot(String path, String label)
ICommandaddScreenshot in interface ICommandpath - image path.label - image label.public List<Screenshot> getScreenshots()
ICommandgetScreenshots in interface ICommandCopyright © 2016. All rights reserved.