Skip to content

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

License

Notifications You must be signed in to change notification settings

elyamurza/Selenium_Screenshot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 clipped Html Element using Selenium Webdriver

Installation :

pip install Selenium-Screenshot

This Package Support Python 3.6+ only

How to Use :

For Full Page ScreenShot :

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')
print(img_url)
driver.close()

driver.quit()

For Html Element Clipping :

from Screenshot import Screenshot
from selenium import webdriver

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_class_name('signup-prompt')
img_url = ob.get_element(driver, element, r'.')
print(img_url)

driver.close()

driver.quit()

For Html Element Clipping with Hiding Element :

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=avatar width-full height-full avatar-before-user-status']  # Use full class name
img_url = ob.full_Screenshot(driver, save_path=r'.', elements=Hide_elements, image_name='Myimage.png')
print(img_url)
driver.close()

driver.quit()

Limitation:

  • Screenshot can take only 10000 of height of website

Contact Information :

Email:[email protected]

Donation :

If you have found my softwares to be of any use to you, do consider helping me pay my internet bills. This would encourage me to create many such softwares.

Donate via PayPal

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%