Skip to content

Take and Save Screenshot method #33

@obed-vazquez

Description

@obed-vazquez

Here is how to take the Screenshot

String screenShotFileName="./Screenshots/" + logID + "_" + LocalDate.now().toString().replace(":| ", "_") + ".png";
			log.warn("{}Evidences:{}", logID, screenShotFileName);
			FileUtils.copyFile(((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE),
							   new File(screenShotFileName));

Implement this?
https://www.numpyninja.com/post/how-to-take-screenshots-for-failed-tests-using-testng

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions