Skip to content

Commit

Permalink
Implement toString for OutputType.
Browse files Browse the repository at this point in the history
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 <vlotoshnikov@gmail.com>
  • Loading branch information
joshbruning authored and sevaseva committed May 19, 2015
1 parent 8380cd6 commit b4d8238
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions java/client/src/org/openqa/selenium/OutputType.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public String convertFromBase64Png(String base64Png) {
public String convertFromPngBytes(byte[] png) {
return new Base64Encoder().encode(png);
}

public String toString() {
return "OutputType.BASE64";
}
};

/**
Expand All @@ -56,6 +60,10 @@ public byte[] convertFromBase64Png(String base64Png) {
public byte[] convertFromPngBytes(byte[] png) {
return png;
}

public String toString() {
return "OutputType.BYTES";
}
};

/**
Expand Down Expand Up @@ -94,6 +102,10 @@ private File save(byte[] data) {
}
}
}

public String toString() {
return "OutputType.FILE";
}
};

/**
Expand Down

0 comments on commit b4d8238

Please sign in to comment.