Capture Screenshot in Selenium Webdriver using python

Published: 28 October 2017
on channel: Specialize Automation
4,613
18

Capture Screenshot in Selenium Webdriver using python and storing screenshots test wise in separate directory.

Python Selenium webdriver screenshots,
Taking Screenshot in Selenium Webdriver,
Taking Screenshot using Selenium python,
How to take screenshots in selenium Webdriver,
How to capture screenshots in selenium using python,
Capturing screenshots in Selenium Webdriver,
Screenshots in selenium Webdriver,


from selenium import webdriver
class SS(object):

def __init__(self, driver):
self.driver = driver

def ScreenShot(self, path):
directory = "C:/Users/Laptop/PycharmProjects/Selenium_Python/WebAutomation/ScreenShots"
self.driver.get_screenshot_as_file(directory+path)


Linkedin:   / aditya-kumar-roy-b3673368  
Facebook:   / specializeautomation