mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-20 04:35:32 +00:00
bug6135: added fixmes for screenshot writing
This commit is contained in:
+2
@@ -58,6 +58,7 @@ public class ScreenShotRule implements TestExecutionExceptionHandler {
|
||||
if (screenshotFolder != null) {
|
||||
environment.getWindowManager().forEachOpenedWindow(window -> {
|
||||
final String filename = UUID.randomUUID().toString();
|
||||
// FIXME we only use one driver for multiple windows. How to select the right window for screenshot?
|
||||
WebDriver driver = window.getWebDriver();
|
||||
if (RemoteWebDriver.class.equals(driver.getClass())) {
|
||||
driver = new Augmenter().augment(driver);
|
||||
@@ -67,6 +68,7 @@ public class ScreenShotRule implements TestExecutionExceptionHandler {
|
||||
source = new ByteArrayInputStream(((TakesScreenshot) driver).getScreenshotAs(OutputType.BYTES));
|
||||
}
|
||||
try {
|
||||
// FIXME how could this ever have written to the correct folder? This always writes to ScreenShotRule...
|
||||
final File destinationDir = new File(screenshotFolder, getClass().getName());
|
||||
destinationDir.mkdirs();
|
||||
final File destination = new File(destinationDir, filename + SCREENSHOT_FILE_EXTENSION); //$NON-NLS-1$
|
||||
|
||||
Reference in New Issue
Block a user