Selenium Screenshot:
The Selenium Screenshot is used to clip Html pages and elements using Selenium.
Installation:
pip install Selenium-Screenshot
This package supports Python 3.6+ only.
How to Use:
For Full Page Screenshot:
from selenium import webdriver
from Screenshot import Screenshot
driver = webdriver.Chrome()
driver.get("https://en.wikipedia.org/wiki/Python")
ss = Screenshot(driver)
# Example: hide sticky header + specific table
table_to_hide = driver.find_element("css selector", "#p-search")
ss.capture_full_page(
output_path="python_wiki.png",
hide_selectors=[".vector-sticky-header", "#mw-head", table_to_hide] # mix of CSS + WebElement
)
driver.quit()
For Html Element Clipping:
from selenium import webdriver
from Screenshot import Screenshot
driver = webdriver.Chrome()
driver.get("https://en.wikipedia.org/wiki/Python")
ss = Screenshot(driver)
# Capture a specific box (e.g., infobox)
content_only = driver.find_element("css selector", "#mw-content-text")
ss.capture_element(content_only, "content_only.png")
driver.quit()
Contact Information:
Donation:
If you have found my software to be of any use to you, do consider helping me pay my internet bills. This would encourage me to maintain and create more projects.
Release files for Selenium-Screenshot 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| selenium_screenshot-3.0.0.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| selenium_screenshot-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / selenium_screenshot-3.0.0.tar.gz
| Download URL | selenium_screenshot-3.0.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83d1dda3621c53f981d0cc648b9e39f19dbdf46a927fc44316ecae2b7d447117
|
|
BLAKE2b-256 checksum How to use checksums |
59d84101d50a6ed52f9da086adf35330ce3abe917219762591921023a34debc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.5
|
Release files / selenium_screenshot-3.0.0-py3-none-any.whl
| Download URL | selenium_screenshot-3.0.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d222d645fe8daffd59f48276e59afc3da045c6944d94461bdcd3684938922d54
|
|
BLAKE2b-256 checksum How to use checksums |
ac0082e0ad2fbe0205552eae5a6ab99052a6c251b5a34d5d9d2a520c9150af84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.5
|