deadfish
deadfish

Reputation: 12304

How use selenium capturescreen and save into jenkins project?

I tried many ways and i still stuck. I use code:

File f = new File("reports.png");
selenium.captureEntirePageScreenshot(f.getAbsolutePath(), "");

I tried also

protected String dir_path = System.getProperty("user.dir");

and no results. I cant find any images in jenkins project folder. I tried

*iexplore
but then i got error cuz selenium cannot make screenshot when is with iexplorer. So i changed to
*firefox

Upvotes: 1

Views: 769

Answers (1)

Kieren Dixon
Kieren Dixon

Reputation: 937

Jenkins sets some environment variables when executing a job. You are probably looking for the WORKSPACE variable.

Upvotes: 2

Related Questions