Skip to content

Commit 19dfc41

Browse files
authored
[py] Fix return type hint in get_screenshot_as_png (#10060)
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)
1 parent 3244a8b commit 19dfc41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/selenium/webdriver/remote/webdriver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ def save_screenshot(self, filename) -> bool:
13411341
"""
13421342
return self.get_screenshot_as_file(filename)
13431343

1344-
def get_screenshot_as_png(self) -> str:
1344+
def get_screenshot_as_png(self) -> bytes:
13451345
"""
13461346
Gets the screenshot of the current window as a binary data.
13471347

0 commit comments

Comments
 (0)