hiteshmurkute
hiteshmurkute

Reputation: 11

Screenshots using Selenium-RC with JUnit, Java & Eclipse

I need to take screenshots in Selenium-RC (JUnit, Eclipse & Java). I want to take screenshots anywhere I want and not just on test failure. Thanks in advance.

Upvotes: 1

Views: 3887

Answers (1)

user1297342
user1297342

Reputation:

You can use

selenium.captureScreenshot("/tmp/" + this.getClass().getName() + "."
+ testMethodName + ".png");

OR

selenium.captureEntirePageScreenShotToString();

OR

selenium.captureEntirePageScreenshot("C:\screenshot.png","");

Upvotes: 4

Related Questions