How to capture Screenshot from streamlit web App

If this helps, I have implemented an initial version of a “Page Screenshot” button, as posted here:
Streamlit Screenshots

Feel free to reach out or provide any feedback!