screenshot
The command to take a screenshot of the current window.
Syntax
py.screenshot(filename: str) -> None
Usage
# saves the screenshot to the current working directory
py.screenshot("ss.png")
---or---
# saves the screenshot using the filepath
py.screenshot("../images/ss.png")
# Errors, include the file extension like '.png'
py.screenshot("ss")
---or---
# Errors, .screenshot() yields None
py.screenshot("ss.png").get("a")
Arguments
filename (str)
- The filename including the path to the directory you want to save it in
Yields
None
Last updated