Return toReturn.
Return toReturn.
It seems clear from the code and the name of the method,
getAndClearScreenshot, that this is the intended behavior.
@@ -251,7 +251,7 @@ public void attachScreenshot(String base64EncodedImage) {
public String getAndClearScreenshot() {
String toReturn = screenshot;
screenshot = null;
- return screenshot;
+ return toReturn;
}
@Override
