My blog has moved!
You should be automatically redirected in 5 seconds. If not, visit and update your bookmarks.

Thursday, 6 November 2008

Use selenium to create screenshot

I just stunbled across selenium as a tool to take screenshot.
Thuis could be useful for anything.

In my case i used it to take the screenshot of a page just before it throws an error in my selenium test. and that i could have a look and investigate what the problem might have been.

very simple command and the great thing is it can be easily used for screenshots of a page across different browsers.

browser.CaptureEntirePageScreenshot("C:\\actual _path_to_where_you_want the_file _placed\\screenshot.png");

No comments: