Is there any way to get the response body in bytes when using wait for response?

I wait for a response that returns a png image. Currently I can only fetch the text of the response when I use wait for response.
The problem is, when I try to convert the string to byte, it fails (cannot convert the character with question mark in diamond shape).
Therefore, I cannot save the response as byte and hence I cannot verify the image.
It works fine when I use the requests library and use the content property.
Has anyone managed to work with image received in the response body while using wait for response?

That is not supported out of the box, but it would be nice enhancement idea. Can you write issue to the Browser library issue tracker and lets see what we can do about it.

1 Like