@Test public void testExtractScreenshotName() throws Exception { assertEquals( testling.extractScreenshotFormat(new SakuliExceptionWithScreenshot("test", Paths.get("computer.new.png"))), "png"); assertEquals( testling.extractScreenshotFormat(new SakuliExceptionWithScreenshot("test", Paths.get("computer.new.jpg"))), "jpg"); assertEquals( testling.extractScreenshotFormat(new SakuliExceptionWithScreenshot("test", Paths.get("bsald_w.jpg"))), "jpg"); assertNull(testling.extractScreenshotFormat(new SakuliExceptionWithScreenshot("test", null))); }
protected String extractScreenshotFormat(Exception exception) { if (exception instanceof SakuliExceptionWithScreenshot) { Path screenshotPath = ((SakuliExceptionWithScreenshot) exception).getScreenshot(); if (screenshotPath != null) { return StringUtils.substringAfterLast(screenshotPath.getFileName().toString(), "."); } } return null; }
ScreenshotDivConverter { protected String extractScreenshotFormat(Exception exception) { if (exception instanceof SakuliExceptionWithScreenshot) { Path screenshotPath = ((SakuliExceptionWithScreenshot) exception).getScreenshot(); if (screenshotPath != null) { return StringUtils.substringAfterLast(screenshotPath.getFileName().toString(), "."); } } return null; } }
ScreenshotDivConverter { protected String extractScreenshotFormat(Exception exception) { if (exception instanceof SakuliExceptionWithScreenshot) { Path screenshotPath = ((SakuliExceptionWithScreenshot) exception).getScreenshot(); if (screenshotPath != null) { return StringUtils.substringAfterLast(screenshotPath.getFileName().toString(), "."); } } return null; }  }
ScreenshotDivConverter { protected String extractScreenshotFormat(Exception exception) { if (exception instanceof SakuliExceptionWithScreenshot) { Path screenshotPath = ((SakuliExceptionWithScreenshot) exception).getScreenshot(); if (screenshotPath != null) { return StringUtils.substringAfterLast(screenshotPath.getFileName().toString(), "."); } } return null; }  static String removeBase64ImageDataString(String string); ScreenshotDiv convert(Exception e); }
ScreenshotDivConverter { protected String extractScreenshotFormat(Exception exception) { if (exception instanceof SakuliExceptionWithScreenshot) { Path screenshotPath = ((SakuliExceptionWithScreenshot) exception).getScreenshot(); if (screenshotPath != null) { return StringUtils.substringAfterLast(screenshotPath.getFileName().toString(), "."); } } return null; }  static String removeBase64ImageDataString(String string); ScreenshotDiv convert(Exception e); static final String REGEX_SRC_DATA_IMAGE_BASE64; }