TakesScreenshot is the public interface of Selenium that provides a method getScreenshotAs()to capture the screenshot and store it in the specified location.
TakesScreenshot
TakesScreenshot is the public interface that provides a method getScreenshotAs()
to capture the screenshot and store it in the specified location and implements the following classes:
- FirefoxDriver
- ChromeDriver
- InternetExplorerDriver
- EdgeDriver
- OperaDriver
- SafariDriver
- EventFiringWebDriver
- RemoteWebDriver
- RemoteWebElement
This implies that the driver that can capture a screenshot and store it and is achieved by casting the driver instance into TakesScreenshot
type instance.
Reference: Interface TakesScreenshot