i try to take a full screenshot of the whole html-page using the following code -
- i would like to do this with selenium (not pyppeteer)
- i am searching for a python-solution (not Java)
- i am searching for a non-headless solution (not headless)
- i wold like to do this with selenium (not seleniumbase)
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?
asked 4 hours ago
Rapid1898
1,5553 gold badges18 silver badges48 bronze badges
-
This question is similar to: How to get screenshot of full webpage using Selenium and Java?. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.0stone0– 0stone02025年11月19日 10:39:18 +00:00Commented 4 hours ago
-
stackoverflow.com/questions/41721734/…0stone0– 0stone02025年11月19日 10:40:04 +00:00Commented 4 hours ago
-
stackoverflow.com/a/53825388/15358800Bhargav– Bhargav2025年11月19日 10:42:08 +00:00Commented 4 hours ago
-
This question is similar to: Take screenshot of full page with Selenium Python with chromedriver. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.Bhargav– Bhargav2025年11月19日 10:42:34 +00:00Commented 4 hours ago
-
Thanks for the link - but i am searching for another solution - - i am not searching for java - for python - and i am not searching for headless-mode - for non-headless mode (everything is stated in my initial question i would say - when i understand it correct your links are refreing to either a java-solution or a headless-solution)Rapid1898– Rapid18982025年11月19日 11:46:46 +00:00Commented 3 hours ago
lang-py