Reputation: 183
Is there anyway function that will insert a capture screenshot function after every page event, such as pageload or selecting a dropdown. currently I am using selenium html files and feeding those to selenium rc but have to manually insert screenshots after every command. and if i edit the script i have to edit the screenshots again.
Upvotes: 1
Views: 1484
Reputation: 1
I had this problem. I couldn't find a way to do this exactly, but I got around it by spawning a new thread at the start of each test that took a screen shot every half second, and killed that thread in the teardown.
Upvotes: 0
Reputation: 1177
Use captureEntirePageScreenshot(String fileName, "")
filName should be absolute path of file location say "C:/foo/bar.png"
Better way would be to create a base folder and generate a string everytime you have to caputre screenshot
`captureEntirePageScreenshot(rootFolder+"/"+generatedString+".png","")
this works very well in firefox 3.6
Upvotes: 1