Skip to main content

This package is used to Clipped Images of Html Elements of Selenium Webdriver

Project description

forthebadge made-with-python

Selenium Screenshot:

Open Source Love svg1 License: MIT Downloads Python 3.6 PyPI version Python package

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:

Email:py.wizard.org@gmail.com

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.

Donate via PayPal

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

selenium_screenshot-3.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

selenium_screenshot-3.0.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file selenium_screenshot-3.0.0.tar.gz.

File metadata

  • Download URL: selenium_screenshot-3.0.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for selenium_screenshot-3.0.0.tar.gz
Algorithm Hash digest
SHA256 83d1dda3621c53f981d0cc648b9e39f19dbdf46a927fc44316ecae2b7d447117
MD5 f0f2d503155d5192948a42071518edd2
BLAKE2b-256 59d84101d50a6ed52f9da086adf35330ce3abe917219762591921023a34debc8

See more details on using hashes here.

File details

Details for the file selenium_screenshot-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for selenium_screenshot-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d222d645fe8daffd59f48276e59afc3da045c6944d94461bdcd3684938922d54
MD5 13a1c760073b8f97150a96ddfd27d58b
BLAKE2b-256 ac0082e0ad2fbe0205552eae5a6ab99052a6c251b5a34d5d9d2a520c9150af84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page