Skip to content

Commit

Permalink
Merge pull request #9 from marrakchino/master
Browse files Browse the repository at this point in the history
Allow elements to hide from `get_element` function
  • Loading branch information
sam4u3 authored Jun 16, 2020
2 parents 2dbef0a + bcc6ae6 commit 463b052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Screenshot/Screenshot_Clipping.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def full_Screenshot(self, driver: WebDriver, save_path: str = '', image_name: st
stitched_image.save(save_path)
return save_path

def get_element(self, driver: WebDriver, element: WebElement, save_location: str) -> str:
def get_element(self, driver: WebDriver, element: WebElement, save_location: str, to_hide: list = None) -> str:
"""
Usage:
Capture Element screenshot as a image
Expand All @@ -129,7 +129,7 @@ def get_element(self, driver: WebDriver, element: WebElement, save_location: str
Raises:
N/A
"""
image = self.full_Screenshot(driver, save_path=save_location, image_name='clipping_shot.png')
image = self.full_Screenshot(driver, save_path=save_location, image_name='clipping_shot.png', elements=to_hide)
location = element.location
size = element.size
x = location['x']
Expand Down

0 comments on commit 463b052

Please sign in to comment.