How do I save it to a variable without saving it as a screenshot file?
I'd like to access the website, take a screenshot, save it as a variable, not save it as a file, and register it as an attachment in an email and send it to you I'm asking you this question because I can only see you saving it as a file in Selenium.
If I save it as a file, I have to make a code that keeps erasing or erasing it
python selenium
The method for saving screenshots to variables is extracted from WebDriver API.
get_screenshot_as_png()
Gets the screenshot of the current window as a binary data.
Usage: driver.get_screenshot_as_png()
© 2024 OneMinuteCode. All rights reserved.