Screenshot of Streamlit app


First of all thanks for offering this amazing Streamlit service!

I would like to share an issue I am experiencing and ask for some help. I understand it is probably more a web-scraping question, nevertheless, I thought others in the Streamlit community might have experienced the same problem.

The script below (which I found here) is used to take a screenshot of a private Streamlit web-app running on an AWS EC2 instance.

from time import sleep
from selenium import webdriver
from import Options

options = webdriver.ChromeOptions()
options.headless = True
driver = webdriver.Chrome(options=options)
URL = 'http://<ADDRESS>:<PORT>/'

S = lambda X: driver.execute_script('return document.body.parentNode.scroll'+X)


The script creates the .png file but it is not a full-page screenshot. The image file simply shows the top of the page, the width seems the correct one but the height is too small (the dimension is 2400 × 26…)
How can I get the screenshot showing the full content of the webpage?