[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)
**Selenium Screenshot:**
[![Open Source Love svg1](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://static.pepy.tech/personalized-badge/selenium-screenshot?period=total&units=none&left_color=yellowgreen&right_color=blue&left_text=Downloads)](https://pepy.tech/project/selenium-screenshot)
[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![PyPI version](https://badge.fury.io/py/Selenium-Screenshot.svg)](https://badge.fury.io/py/Selenium-Screenshot)
![Python package](https://github.com/sam4u3/Selenium_Screenshot/workflows/Python%20package/badge.svg)
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:**
```python
from Screenshot import Screenshot
from selenium import webdriver
ob = Screenshot.Screenshot()
driver = webdriver.Chrome()
url = "https://github.com/sam4u3/Selenium_Screenshot/tree/master/test"
driver.get(url)
img_url = ob.full_screenshot(driver, save_path=r'.', image_name='myimage.png', is_load_at_runtime=True,
load_wait_time=3)
print(img_url)
driver.close()
driver.quit()
```
**For Html Element Clipping:**
````python
from Screenshot import Screenshot
from selenium import webdriver
from selenium.webdriver.common.by import By
ob = Screenshot.Screenshot()
driver = webdriver.Chrome()
url = "https://github.com/sam4u3/Selenium_Screenshot/blob/master/Screenshot/Screenshot_Clipping.py"
driver.get(url)
element = driver.find_element(By.XPATH, "//img[@title='Donate via PayPal']")
img_url = ob.get_element(driver, element, save_path=r'.', image_name='paypal.png')
print(img_url)
driver.close()
driver.quit()
````
**For Html Element Clipping with Hiding Element:**
````python
from Screenshot import Screenshot
from selenium import webdriver
ob = Screenshot.Screenshot()
driver = webdriver.Chrome()
url = "https://github.com/sam4u3"
driver.get(url)
hide_elements = ['class=position-relative js-header-wrapper ']
img_url = ob.full_screenshot(driver, save_path=r'.', image_name='myimage.png',
hide_elements=hide_elements)
print(img_url)
driver.close()
driver.quit()
````
**Limitation:**
- Screenshot can take only 10000 of height of website
**Contact Information:**
[Email:py.wizard.org@gmail.com](mailto::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.
<a href="https://www.paypal.me/sam4u3" target="_blank"><img src="https://raw.githubusercontent.com/aha999/DonateButtons/master/Paypal.png" alt="Donate via PayPal" title="Donate via PayPal" /></a>
Raw data
{
"_id": null,
"home_page": "https://github.com/PyWizards/Selenium_Screenshot",
"name": "Selenium-Screenshot",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6.1",
"maintainer_email": "",
"keywords": "",
"author": "PyWizard org",
"author_email": "py.wizard.org@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/61/7a/4c7746b687e07adba89262956996dc5b355ae0fcab6572b660697a139a0b/Selenium-Screenshot-2.1.0.tar.gz",
"platform": "any",
"description": "[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)\n\n**Selenium Screenshot:**\n\n[![Open Source Love svg1](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Downloads](https://static.pepy.tech/personalized-badge/selenium-screenshot?period=total&units=none&left_color=yellowgreen&right_color=blue&left_text=Downloads)](https://pepy.tech/project/selenium-screenshot)\n[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/)\n[![PyPI version](https://badge.fury.io/py/Selenium-Screenshot.svg)](https://badge.fury.io/py/Selenium-Screenshot)\n![Python package](https://github.com/sam4u3/Selenium_Screenshot/workflows/Python%20package/badge.svg)\n\n\nThe Selenium Screenshot is used to clip Html pages and elements using Selenium.\n\n**Installation:**\n\n`pip install Selenium-Screenshot`\n\nThis package supports Python 3.6+ only.\n\n**How to Use:**\n\n**For Full Page Screenshot:**\n\n```python\nfrom Screenshot import Screenshot\nfrom selenium import webdriver\n\nob = Screenshot.Screenshot()\ndriver = webdriver.Chrome()\nurl = \"https://github.com/sam4u3/Selenium_Screenshot/tree/master/test\"\ndriver.get(url)\nimg_url = ob.full_screenshot(driver, save_path=r'.', image_name='myimage.png', is_load_at_runtime=True,\n load_wait_time=3)\nprint(img_url)\ndriver.close()\n\ndriver.quit()\n```\n\n**For Html Element Clipping:**\n\n````python\nfrom Screenshot import Screenshot\nfrom selenium import webdriver\nfrom selenium.webdriver.common.by import By\n\nob = Screenshot.Screenshot()\ndriver = webdriver.Chrome()\nurl = \"https://github.com/sam4u3/Selenium_Screenshot/blob/master/Screenshot/Screenshot_Clipping.py\"\ndriver.get(url)\n\nelement = driver.find_element(By.XPATH, \"//img[@title='Donate via PayPal']\")\nimg_url = ob.get_element(driver, element, save_path=r'.', image_name='paypal.png')\nprint(img_url)\ndriver.close()\ndriver.quit()\n\n````\n\n**For Html Element Clipping with Hiding Element:**\n\n````python\nfrom Screenshot import Screenshot\nfrom selenium import webdriver\n\nob = Screenshot.Screenshot()\ndriver = webdriver.Chrome()\nurl = \"https://github.com/sam4u3\"\ndriver.get(url)\nhide_elements = ['class=position-relative js-header-wrapper ']\nimg_url = ob.full_screenshot(driver, save_path=r'.', image_name='myimage.png',\n hide_elements=hide_elements)\nprint(img_url)\ndriver.close()\n\ndriver.quit()\n\n\n````\n**Limitation:**\n\n- Screenshot can take only 10000 of height of website\n\n\n**Contact Information:**\n\n[Email:py.wizard.org@gmail.com](mailto::py.wizard.org@gmail.com)\n\n**Donation:**\n\nIf 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.\n\n<a href=\"https://www.paypal.me/sam4u3\" target=\"_blank\"><img src=\"https://raw.githubusercontent.com/aha999/DonateButtons/master/Paypal.png\" alt=\"Donate via PayPal\" title=\"Donate via PayPal\" /></a>",
"bugtrack_url": null,
"license": "MIT",
"summary": "This package is used to Clipped Images of Html Elements of Selenium Webdriver",
"version": "2.1.0",
"project_urls": {
"Homepage": "https://github.com/PyWizards/Selenium_Screenshot"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "617a4c7746b687e07adba89262956996dc5b355ae0fcab6572b660697a139a0b",
"md5": "d8d07eb00808cfe9d3b9ddede40c2793",
"sha256": "3c733fab6a3ba205b17ceee01c65419db677be4ac46827503b1dcace521b1197"
},
"downloads": -1,
"filename": "Selenium-Screenshot-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "d8d07eb00808cfe9d3b9ddede40c2793",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.1",
"size": 5384,
"upload_time": "2023-04-29T06:46:07",
"upload_time_iso_8601": "2023-04-29T06:46:07.366467Z",
"url": "https://files.pythonhosted.org/packages/61/7a/4c7746b687e07adba89262956996dc5b355ae0fcab6572b660697a139a0b/Selenium-Screenshot-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-29 06:46:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PyWizards",
"github_project": "Selenium_Screenshot",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "selenium-screenshot"
}