Reputation: 11
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
Reputation:
You can use
selenium.captureScreenshot("/tmp/" + this.getClass().getName() + "."
+ testMethodName + ".png");
OR
selenium.captureEntirePageScreenShotToString();
OR
selenium.captureEntirePageScreenshot("C:\screenshot.png","");
Upvotes: 4