-
Notifications
You must be signed in to change notification settings - Fork 2
Take Screenshot
NaveenS edited this page Apr 17, 2020
·
1 revision
Screenshots mainly helps in defect analysis and helps you to understand the what happened in particular moments of failure of the script.
Below method is used to take the screenshot of your web page
driver.save_screenshot('screenshot1.png')
With the Selenium Webdriver screenshot method. You can take a screenshot of the alert boxes. In order to achieve that you can use PIL.ImageGrab.
import PIL.ImageGrab
im = PIL.ImageGrab.grab()
im.save("screenshot.png", "PNG")