Package 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 Also:
TakesScreenshot
-
-
Field Summary
Fields Modifier and Type Field Description static OutputType<java.lang.String>
BASE64
Obtain the screenshot as base64 data.static OutputType<byte[]>
BYTES
Obtain the screenshot as raw bytes.static OutputType<java.io.File>
FILE
Obtain the screenshot into a temporary file that will be deleted once the JVM exits.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
convertFromBase64Png(java.lang.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<java.lang.String> BASE64
Obtain the screenshot as base64 data.
-
BYTES
static final OutputType<byte[]> BYTES
Obtain the screenshot as raw bytes.
-
FILE
static final OutputType<java.io.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(java.lang.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.
-
-