Selenium WebDriver Tutorial #38 – How to Take Screenshot in Selenium

In this selenium webdriver tutorial we will learn how to take screenshot in selenium webDriver. Selenium provides takes screenshot interface to capture the screenshots during script execution. Takes screenshot interface has method get screenshot as which is used for taking screenshots. Taking screenshots when the test case fails is very common requirement in any test automation and your test automation framework should have capability to take screenshots in case you need them for reporting and debugging purposes.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.