1

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.

hiteshmurkute
  • 11
  • 1
  • 2
  • So what's your question? What's wrong with "Prt-Scn"? What platform are you on? What have you tried so far? – paulsm4 Mar 30 '12 at 06:30

1 Answers1

4

You can use

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

OR

selenium.captureEntirePageScreenShotToString();

OR

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