Skip to content

Commit b4d8238

Browse files
joshbruningsevaseva
authored andcommitted
Implement toString for OutputType.
Returns a String that textually represents the object. I desire this for viewing in a debugger and for user code that logs OutputType. Signed-off-by: Seva Lotoshnikov <[email protected]>
1 parent 8380cd6 commit b4d8238

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: java/client/src/org/openqa/selenium/OutputType.java

+12
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ public String convertFromBase64Png(String base64Png) {
4343
public String convertFromPngBytes(byte[] png) {
4444
return new Base64Encoder().encode(png);
4545
}
46+
47+
public String toString() {
48+
return "OutputType.BASE64";
49+
}
4650
};
4751

4852
/**
@@ -56,6 +60,10 @@ public byte[] convertFromBase64Png(String base64Png) {
5660
public byte[] convertFromPngBytes(byte[] png) {
5761
return png;
5862
}
63+
64+
public String toString() {
65+
return "OutputType.BYTES";
66+
}
5967
};
6068

6169
/**
@@ -94,6 +102,10 @@ private File save(byte[] data) {
94102
}
95103
}
96104
}
105+
106+
public String toString() {
107+
return "OutputType.FILE";
108+
}
97109
};
98110

99111
/**

0 commit comments

Comments
 (0)