Home > screenshot in selenium

Take screenshot or print screen using selenium

For analysis , debugging and reporting it is important to take screenshot in any state of script execution. To achieve this in selenium we need to follow below steps Include library import org.openqa.selenium.TakesScreenshot; create object and call getScreenshotAs method And paste the file into proper location using FileUtils method copyFile. Type cast the TakesScreenshot

This Article is TAGGED in . Read more