Package jp.vmi.selenium.selenese.command
Class AbstractCommand
java.lang.Object
jp.vmi.selenium.selenese.command.AbstractCommand
- All Implemented Interfaces:
ArgumentInfo,ICommand
- Direct Known Subclasses:
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,Debugger,DeleteAllVisibleCookies,DeleteCookie,DeselectPopUp,DoubleClick,DoubleClickAt,DragAndDrop,DragAndDropToObject,Echo,EditContent,ExecuteAsyncScript,ExecuteScript,FireEvent,Focus,GoBack,GotoIf,Gotolabel,Highlight,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,Store,StoreJson,Submit,Type,TypeKeys,Uncheck,UseXpathLibrary,WaitForCondition,WaitForPageToLoad,WaitForPopUp,WindowFocus,WindowMaximize
public abstract class AbstractCommand extends Object implements ICommand
Base implementation of command.
-
Constructor Summary
Constructors Constructor Description AbstractCommand(int index, String name, String[] args, ArgumentType... argTypes)Constructor. -
Method Summary
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.protected abstract ResultexecuteImpl(Context context, String... curArgs)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()Get beginning-of-loop command.String[]getVariableResolvedArguments(SourceType sourceType, VarsMap varsMap)Get command arguments where variables resolved.booleanmayUpdateScreen()May the command update screen?voidsetBlockStart(BlockStart blockStart)Set beginning-of-block command.voidsetSideCommand(SideCommand sideCommand)Set side command.voidsetStartLoop(StartLoop startLoop)Set beginning-of-loop command.StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jp.vmi.selenium.selenese.ArgumentInfo
getArgumentCountMethods inherited from interface jp.vmi.selenium.selenese.command.ICommand
isComposite, isNativeAlertHandler
-
Constructor Details
-
AbstractCommand
Constructor.- Parameters:
index- command index.name- command name.args- command args.argTypes- command argument types.
-
-
Method Details
-
getSource
Description copied from interface:ICommandGet source elements. -
getIndex
public int getIndex()Description copied from interface:ICommandGet index in selenese script file (1 origin). -
getName
Description copied from interface:ICommandGet command name. -
getArguments
Description copied from interface:ICommandGet command arguments.- Specified by:
getArgumentsin interfaceICommand- Returns:
- command arguments.
-
getVariableResolvedArguments
Description copied from interface:ICommandGet command arguments where variables resolved.- Specified by:
getVariableResolvedArgumentsin interfaceICommand- Parameters:
sourceType- source type.varsMap- map of variables.- Returns:
- arguments.
-
convertLocators
Deprecated.Description copied from interface:ICommandConvert locators from arguments.- Specified by:
convertLocatorsin interfaceICommand- Parameters:
args- the command arguments.- Returns:
- converted locators.
-
extractLocators
Description copied from interface:ICommandExtract locators from arguments.- Specified by:
extractLocatorsin interfaceICommand- Parameters:
args- the command arguments.- Returns:
- extracted parsed locators.
-
mayUpdateScreen
public boolean mayUpdateScreen()Description copied from interface:ICommandMay the command update screen?- Specified by:
mayUpdateScreenin interfaceICommand- Returns:
- true if the command may update screen.
-
executeImpl
-
execute
Description copied from interface:ICommandExecute the command.Note: set the command result to testCase in this method.
-
getResult
Description copied from interface:ICommandGet the command result. -
setBlockStart
Description copied from interface:ICommandSet beginning-of-block command.- Specified by:
setBlockStartin interfaceICommand- Parameters:
blockStart- beginning-of-block command.
-
getBlockStart
Description copied from interface:ICommandGet beginning-of-block command.- Specified by:
getBlockStartin interfaceICommand- Returns:
- beginning-of-block command.
-
setStartLoop
Description copied from interface:ICommandSet beginning-of-loop command.- Specified by:
setStartLoopin interfaceICommand- Parameters:
startLoop- beginning-of-loop command.
-
getStartLoop
Description copied from interface:ICommandGet beginning-of-loop command.- Specified by:
getStartLoopin interfaceICommand- Returns:
- beginning-of-loop command.
-
addScreenshot
Description copied from interface:ICommandAdd screenshot image.- Specified by:
addScreenshotin interfaceICommand- Parameters:
path- image path.label- image label.
-
getScreenshots
Description copied from interface:ICommandGet list of screenshot images.- Specified by:
getScreenshotsin interfaceICommand- Returns:
- list of image path of sreenshot.
-
setSideCommand
Description copied from interface:ICommandSet side command.- Specified by:
setSideCommandin interfaceICommand- Parameters:
sideCommand- SIDE command.
-
toString
-