scitex_capture.capture
- scitex_capture.capture(message=None, path=None, quality=85, auto_categorize=True, verbose=True, monitor_id=0, capture_all=False, all=False, app=None, url=None, url_wait=3, url_width=1920, url_height=1080, max_cache_gb=1.0)[source]
Take a screenshot - monitor, window, browser, or everything.
- Parameters:
message (str, optional) – Message to include in filename
path (str, optional) – Output path. Defaults to the canonical
$SCITEX_DIR/capture/runtime/screenshots/directory when unset.quality (int) – JPEG quality (1-100)
all (bool) – Capture all monitors
app (str, optional) – App name to capture (e.g., “chrome”, “code”)
url (str, optional) – URL to capture via browser (e.g., “http://127.0.0.1:8000/”)
url_wait (int) – Seconds to wait for page load (default: 3)
url_width (int) – Browser window width for URL capture (default: 1920)
url_height (int) – Browser window height for URL capture (default: 1080)
monitor_id (int) – Monitor to capture (0-based, default: 0)
- Returns:
Path to saved screenshot
- Return type:
Examples
>>> from scitex import capture >>> >>> capture.snap() # Current monitor >>> capture.snap(all=True) # All monitors >>> capture.snap(app="chrome") # Chrome window >>> capture.snap(url="http://localhost:8000") # Browser page