HENNGE / arsenic

Async WebDriver implementation for asyncio and asyncio-compatible frameworks
Other
350 stars 54 forks source link

Add Session.screenshot coroutine #9

Closed trbs closed 7 years ago

trbs commented 7 years ago

Coroutine to take a screenshot of the top-level browsing context’s viewport.

It also does b64decode so it returns bytes to the user instead of base64 encoded str.

ojii commented 7 years ago

Hello @trbs

I'm sorry for the late response to this. I was busy traveling to and attending EuroPython. I will merge this shortly once I find a way to write a test for it. Thank you for your contribution.

ojii commented 7 years ago

Thank you again for your contribution. Please note that I've changed two small things in your PR: The coroutine method is now called get_screenshot and the return value is an instance of io.BytesIO.