Class ZestClientScreenshot


  • public class ZestClientScreenshot
    extends ZestClient
    A ZestClient action that takes a screenshot.

    The screenshot can be saved to a file and/or to a variable (for the latter Base64 encoded).

    Since:
    0.14.0
    • Constructor Detail

      • ZestClientScreenshot

        public ZestClientScreenshot()
        Constructs a ZestClientScreenshot with no file path nor variable name.
      • ZestClientScreenshot

        public ZestClientScreenshot​(String windowHandle,
                                    String filePath,
                                    String variableName)
        Constructs a ZestClientScreenshot with the given file path and variable name.
        Parameters:
        windowHandle - the window handle to obtain the client.
        filePath - the path to the file where to save the screenshot, might be null.
        variableName - the name of the variable where to save the screenshot (Base64 encoded), might be null.
    • Method Detail

      • getWindowHandle

        public String getWindowHandle()
        Gets the window handle.
        Returns:
        the window handle, might be null.
      • setWindowHandle

        public void setWindowHandle​(String windowHandle)
        Sets the window handle.
        Parameters:
        windowHandle - the new window handle.
      • getFilePath

        public String getFilePath()
        Gets the path to the file.
        Returns:
        the path to the file, might be null.
      • setFilePath

        public void setFilePath​(String filePath)
        Sets the path to the file.

        Variables are replaced before using the path.

        Parameters:
        filePath - the path to the file.
      • getVariableName

        public String getVariableName()
        Gets the name of the variable.
        Returns:
        the name of the variable, might be null.
      • setVariableName

        public void setVariableName​(String variableName)
        Sets the name of the variable.
        Parameters:
        variableName - the name of the variable.
      • isPassive

        public boolean isPassive()
        Description copied from class: ZestStatement
        Checks if is passive.
        Specified by:
        isPassive in class ZestStatement
        Returns:
        true, if is passive