tags:

views:

158

answers:

1

Hi,

I'm using selenium rc to do functional website testing and I've recently experienced a mysterious issue with safari and opera. When a test fails I make a screenshot using the captureEntirePageScreenshotToString command as well as retrieving the html source. Sometimes however this fails with a FileNotFoundException: java.io.FileNotFoundException: C:\DOKUME~1\selenium\LOKALE~1\Temp\customProfileDir8aa20800ab1a46dbb3ef71d4d2d31b77\screenshots\page-screenshot-8aa20800ab1a46dbb3ef71d4d2d31b77.png

Is this a selenium bug? How can I workaround this issue?

I'm using selenium rc standalone 2.0a4.

thanks,

hans

A: 

I suggest you use the Apache Commons FileUtils function makeDirs() to create all the parent directories of the directory where the png image will be located.

Pierre Gardin
@Pierra: I know this error and I've the same issues. I'm running sekenium-rc on Windows and simple feed selenese test; no Java code involved.
mark