[py] Fix return type hint in get_screenshot_as_png
get_screenshot_as_png returns a bytes object but the return type hint
is set to str. This causes IDEs to throw warning when using this function
with io.BytesIO (or any other function that expects bytes object)
@@ -1341,7 +1341,7 @@ class WebDriver(BaseWebDriver):
"""
return self.get_screenshot_as_file(filename)
- def get_screenshot_as_png(self) -> str:
+ def get_screenshot_as_png(self) -> bytes:
"""
Gets the screenshot of the current window as a binary data.
