Answer Posted / Navneet Kumar
To capture a screenshot in Selenium, you can use the `TakesScreenshot` interface. Here's an example:
```
FileUtils.copyFile(driver.getScreenshotAs(OutputType.FILE), new File("screenshots/screenshot.png"));
```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers