org.openqa.selenium
Interface OutputType<T>

Type Parameters:
T - Type for the screenshot output.

public interface OutputType<T>

Defines the output type for a screenshot. See org.openqa.selenium.Screenshot for usage and examples.

See Also:
TakesScreenshot

Field Summary
static OutputType<String> BASE64
          Obtain the screenshot as base64 data.
static OutputType<byte[]> BYTES
          Obtain the screenshot as raw bytes.
static OutputType<File> FILE
          Obtain the screenshot into a temporary file that will be deleted once the JVM exits.
 
Method Summary
 T convertFromBase64Png(String base64Png)
          Convert the given base64 png to a requested format.
 T convertFromPngBytes(byte[] png)
          Convert the given png to a requested format.
 

Field Detail

BASE64

static final OutputType<String> BASE64
Obtain the screenshot as base64 data.


BYTES

static final OutputType<byte[]> BYTES
Obtain the screenshot as raw bytes.


FILE

static final OutputType<File> FILE
Obtain the screenshot into a temporary file that will be deleted once the JVM exits. It is up to users to make a copy of this file.

Method Detail

convertFromBase64Png

T convertFromBase64Png(String base64Png)
Convert the given base64 png to a requested format.

Parameters:
base64Png - base64 encoded png.
Returns:
png encoded into requested format.

convertFromPngBytes

T convertFromPngBytes(byte[] png)
Convert the given png to a requested format.

Parameters:
png - an array of bytes forming a png file.
Returns:
png encoded into requested format.


Copyright © 2011. All Rights Reserved.