Package jp.vmi.selenium.selenese.command
Interface ICommand
-
- All Superinterfaces:
ArgumentInfo
- All Known Implementing Classes:
AbstractCommand,AddCollection,AddLocationStrategy,AddSelection,AddToCollection,AllowNativeXpath,AltKeyDown,AltKeyUp,AnswerOnNextNativeAlert,AnswerOnNextPrompt,Assert,Assertion,AssignId,AttachFile,BlockEndImpl,BlockStartImpl,BuiltInCommand,CaptureEntirePageScreenshot,Check,ChooseCancelOnNextConfirmation,ChooseCancelOnNextNativeAlert,ChooseCancelOnNextPrompt,ChooseOkOnNextConfirmation,ChooseOkOnNextNativeAlert,Click,ClickAt,Close,Comment,ContextMenu,ControlKeyDown,ControlKeyUp,CreateCookie,DeleteAllVisibleCookies,DeleteCookie,DeselectPopUp,Do,DoubleClick,DoubleClickAt,DragAndDrop,DragAndDropToObject,Echo,EditContent,Else,ElseIf,End,EndFor,EndLoopImpl,EndWhile,ExecuteAsyncScript,ExecuteScript,FireEvent,Focus,ForEach,GoBack,GotoIf,Gotolabel,Highlight,If,Include,KeyDown,KeyPress,KeyUp,Label,MetaKeyDown,MetaKeyUp,Nop,Open,OpenWindow,Pause,Refresh,RemoveAllSelections,RemoveSelection,RepeatIf,Rollup,Run,RunScript,Select,SelectFrame,SelectPopUp,SelectWindow,SetCursorPosition,SetSpeed,SetTimeout,SetWindowSize,ShiftKeyDown,ShiftKeyUp,StartLoopImpl,StartMarker,Store,StoreFor,StoreJson,Submit,Times,Type,TypeKeys,Uncheck,UseXpathLibrary,WaitForCondition,WaitForPageToLoad,WaitForPopUp,While,WindowFocus,WindowMaximize
public interface ICommand extends ArgumentInfo
Command interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddScreenshot(String path, String label)Add screenshot image.String[]convertLocators(String[] args)Deprecated.Resultexecute(Context context, String... curArgs)Execute the command.default Locator[]extractLocators(String[] args)Extract locators from arguments.String[]getArguments()Get command arguments.BlockStartgetBlockStart()Get beginning-of-block command.intgetIndex()Get index in selenese script file (1 origin).StringgetName()Get command name.ResultgetResult()Get the command result.List<Screenshot>getScreenshots()Get list of screenshot images.String[]getSource()Get source elements.StartLoopgetStartLoop()Deprecated.usegetBlockStart()instaed.default String[]getVariableResolvedArguments(SourceType sourceType, VarsMap varsMap)Get command arguments where variables resolved.default booleanisNativeAlertHandler()Is the command native alert handler?booleanmayUpdateScreen()May the command update screen?voidsetBlockStart(BlockStart blockStart)Set beginning-of-block command.voidsetSideCommand(SideCommand sideCommand)Set side command.voidsetStartLoop(StartLoop startLoop)Deprecated.usesetBlockStart(BlockStart)instaed.-
Methods inherited from interface jp.vmi.selenium.selenese.ArgumentInfo
getArgumentCount
-
-
-
-
Method Detail
-
getSource
String[] getSource()
Get source elements.- Returns:
- array of source elements. (always 3 elements)
-
getIndex
int getIndex()
Get index in selenese script file (1 origin).- Returns:
- index.
-
getArguments
String[] getArguments()
Get command arguments.- Returns:
- command arguments.
-
getVariableResolvedArguments
default String[] getVariableResolvedArguments(SourceType sourceType, VarsMap varsMap)
Get command arguments where variables resolved.- Parameters:
sourceType- source type.varsMap- map of variables.- Returns:
- arguments.
-
getName
String getName()
Get command name.- Returns:
- command name.
-
convertLocators
@Deprecated String[] convertLocators(String[] args)
Deprecated.Convert locators from arguments.- Parameters:
args- the command arguments.- Returns:
- converted locators.
-
extractLocators
default Locator[] extractLocators(String[] args)
Extract locators from arguments.- Parameters:
args- the command arguments.- Returns:
- extracted parsed locators.
-
mayUpdateScreen
boolean mayUpdateScreen()
May the command update screen?- Returns:
- true if the command may update screen.
-
isNativeAlertHandler
default boolean isNativeAlertHandler()
Is the command native alert handler?- Returns:
- true if the command is native alert handler.
-
execute
Result execute(Context context, String... curArgs)
Execute the command.Note: set the command result to testCase in this method.
- Parameters:
context- Selenese Runner context.curArgs- current arugments. (the variables in it are extracted)- Returns:
- the command result.
-
getResult
Result getResult()
Get the command result.- Returns:
- the command result.
-
setBlockStart
void setBlockStart(BlockStart blockStart)
Set beginning-of-block command.- Parameters:
blockStart- beginning-of-block command.
-
getBlockStart
BlockStart getBlockStart()
Get beginning-of-block command.- Returns:
- beginning-of-block command.
-
setStartLoop
@Deprecated void setStartLoop(StartLoop startLoop)
Deprecated.usesetBlockStart(BlockStart)instaed.Set beginning-of-loop command.- Parameters:
startLoop- beginning-of-loop command.
-
getStartLoop
@Deprecated StartLoop getStartLoop()
Deprecated.usegetBlockStart()instaed.Get beginning-of-loop command.- Returns:
- beginning-of-loop command.
-
addScreenshot
void addScreenshot(String path, String label)
Add screenshot image.- Parameters:
path- image path.label- image label.
-
getScreenshots
List<Screenshot> getScreenshots()
Get list of screenshot images.- Returns:
- list of image path of sreenshot.
-
setSideCommand
void setSideCommand(SideCommand sideCommand)
Set side command.- Parameters:
sideCommand- SIDE command.
-
-