Class Page.ScreenshotOptions

  • Enclosing interface:
    Page

    public static class Page.ScreenshotOptions
    extends Object
    • Field Detail

      • path

        public Path path
        The file path to save the image to. The screenshot type will be inferred from file extension. If path is a relative path, then it is resolved relative to current working directory. If no path is provided, the image won't be saved to the disk.
      • quality

        public Integer quality
        The quality of the image, between 0-100. Not applicable to png images.
      • fullPage

        public Boolean fullPage
        When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Defaults to false.
      • clip

        public Page.ScreenshotOptions.Clip clip
        An object which specifies clipping of the resulting image. Should have the following fields:
      • omitBackground

        public Boolean omitBackground
        Hides default white background and allows capturing screenshots with transparency. Not applicable to jpeg images. Defaults to false.
      • timeout

        public Integer timeout
        Maximum time in milliseconds, defaults to 30 seconds, pass 0 to disable timeout. The default value can be changed by using the browserContext.setDefaultTimeout(timeout) or page.setDefaultTimeout(timeout) methods.
    • Constructor Detail

      • ScreenshotOptions

        public ScreenshotOptions()