Here’s the code sample from our tutorial on how to take a screenshot in Selenium for Java

 

View on GitHub
©2026 Applitools