I am trying to take a full screenshot of the whole html-page using the following code -
- I would like to do this with
selenium(notpyppeteer) - I am searching for a
pythonsolution (notJava) - I am searching for a non-headless solution (not headless)
- I would like to do this with
selenium(notseleniumbase)
Code:
import time from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By options = Options() srv=Service() driver = webdriver.Chrome (service=srv, options=options) driver.maximize_window() link = "https://rapidtech1898.com/" driver.get (link) time.sleep(3) el = driver.find_element(By.XPATH,'(//body)[1]') el.screenshot("test.png") driver.quit() But it is only taking the first part of the page and not the whole website till the bottom
How can I get the full html-site as a screenshot in non-headless mode?
