Package org.openqa.selenium
Interface OutputType<T>
- Type Parameters:
T
- Type for the screenshot output.
@NullMarked
public interface OutputType<T>
Defines the output type for a screenshot.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OutputType<String>
Obtain the screenshot as base64 data.static final OutputType<byte[]>
Obtain the screenshot as raw bytes.static final OutputType<File>
Obtain the screenshot into a temporary file that will be deleted once the JVM exits. -
Method Summary
Modifier and TypeMethodDescriptionconvertFromBase64Png
(String base64Png) Convert the given base64 png to a requested format.convertFromPngBytes
(byte[] png) Convert the given png to a requested format.
-
Field Details
-
BASE64
Obtain the screenshot as base64 data. -
BYTES
Obtain the screenshot as raw bytes. -
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 Details
-
convertFromBase64Png
Convert the given base64 png to a requested format.- Parameters:
base64Png
- base64 encoded png.- Returns:
- png encoded into requested format.
-
convertFromPngBytes
Convert the given png to a requested format.- Parameters:
png
- an array of bytes forming a png file.- Returns:
- png encoded into requested format.
-