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, Debugger, 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 Details

    • 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.
    • isComposite

      default boolean isComposite()
      Is the command a composite of other commands?
      Returns:
      true if the command is a composite of other commands.
    • 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.
      Set beginning-of-loop command.
      Parameters:
      startLoop - beginning-of-loop command.
    • getStartLoop

      @Deprecated StartLoop getStartLoop()
      Deprecated.
      use getBlockStart() 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.