Interface ICommand

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