selenium store screenshot in a variable python code example Example: python selenium screenshot driver.save_screenshot("screenshot.png")