close()

Explicitly close the module-level browser and CDP connection.

Usage

Source

close()

Call this when you’re done taking screenshots to clean up Chrome processes. If not called, cleanup happens automatically at interpreter exit.