Hi Babita, try using this piece of code to take screenshot of a webpage with Selenium-Python:
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--ignore-certificate-errors')
options.add_argument("--test-type")
driver = webdriver.Chrome("C:\\\\Users\\\\Abha_Rathour\\\\Downloads\\\\ExtractedFiles\\\\chromedriver_win32\\\\chromedriver.exe" ,chrome_options=options)
driver.get('https://python.org')
driver.save_screenshot("screenshot.png")
driver.close(