In a test suite with many cases, it can get annoying to sift through many screenshots. It would be great to be able to specify a directory to place them in. Alternatively, smartly determining if a subdirectory structure exists in the given name, and creating the needed directories would be a good solution too.
Currently, it looks like it tries to write the file (example, give a name like test/snapshot to $page->screenshot(), but dies as the directory does not exist.
Update, I wrote a wrapper to make this functionality, and thought it is worth noting that wherever it clears the Snapshots directory isn't recursive, leaving subdirectories in place.
In a test suite with many cases, it can get annoying to sift through many screenshots. It would be great to be able to specify a directory to place them in. Alternatively, smartly determining if a subdirectory structure exists in the given name, and creating the needed directories would be a good solution too.
Currently, it looks like it tries to write the file (example, give a name like
test/snapshotto$page->screenshot(), but dies as the directory does not exist.Update, I wrote a wrapper to make this functionality, and thought it is worth noting that wherever it clears the
Snapshotsdirectory isn't recursive, leaving subdirectories in place.