@@ -51,7 +51,7 @@ public PageSnapshot highlight(WebElement element) {
51
51
*/
52
52
public PageSnapshot highlight (WebElement element , Color color , int lineWidth ) {
53
53
try {
54
- ImageProcessor .highlight (image , new Coordinates (element , devicePixelRatio ), color , lineWidth );
54
+ image = ImageProcessor .highlight (image , new Coordinates (element , devicePixelRatio ), color , lineWidth );
55
55
} catch (RasterFormatException rfe ) {
56
56
throw new ElementOutsideViewportException (ELEMENT_OUT_OF_VIEWPORT_EX_MESSAGE , rfe );
57
57
}
@@ -93,7 +93,7 @@ public PageSnapshot highlightWithText(WebElement element, Color elementColor, in
93
93
try {
94
94
highlight (element , elementColor , 0 );
95
95
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 );
97
97
} catch (RasterFormatException rfe ) {
98
98
throw new ElementOutsideViewportException (ELEMENT_OUT_OF_VIEWPORT_EX_MESSAGE , rfe );
99
99
}
0 commit comments