@@ -51,7 +51,7 @@ public PageSnapshot highlight(WebElement element) {
5151 */
5252 public PageSnapshot highlight (WebElement element , Color color , int lineWidth ) {
5353 try {
54- ImageProcessor .highlight (image , new Coordinates (element , devicePixelRatio ), color , lineWidth );
54+ image = ImageProcessor .highlight (image , new Coordinates (element , devicePixelRatio ), color , lineWidth );
5555 } catch (RasterFormatException rfe ) {
5656 throw new ElementOutsideViewportException (ELEMENT_OUT_OF_VIEWPORT_EX_MESSAGE , rfe );
5757 }
@@ -93,7 +93,7 @@ public PageSnapshot highlightWithText(WebElement element, Color elementColor, in
9393 try {
9494 highlight (element , elementColor , 0 );
9595 Coordinates coords = new Coordinates (element , devicePixelRatio );
96- ImageProcessor .addText (image , coords .getX (), coords .getY () - textFont .getSize () / 2 , text , textColor , textFont );
96+ image = ImageProcessor .addText (image , coords .getX (), coords .getY () - textFont .getSize () / 2 , text , textColor , textFont );
9797 } catch (RasterFormatException rfe ) {
9898 throw new ElementOutsideViewportException (ELEMENT_OUT_OF_VIEWPORT_EX_MESSAGE , rfe );
9999 }
0 commit comments