@Test
public void testLoadScreenshot_selector() throws Exception {

	File file = new File(BASE_DIRECTORY
			+ "/testId/testClass/testMethod_scId_WINDOWS_firefox_38_CSS_SELECTOR_main_[0].png");
	Map<String, Object> map = new HashMap<String, Object>();
	map.put("platform", "WINDOWS");
	map.put("browserName", "firefox");
	map.put("version", "38");
	PtlCapabilities capabilities = new PtlCapabilities(map);
	IndexDomSelector selector = new IndexDomSelector(SelectorType.CSS_SELECTOR, "main", 0);
	PersistMetadata metadata = new PersistMetadata("testId", "testClass", "testMethod", "scId", selector, null,
			capabilities);
	FileUtils.copyURLToFile(getClass().getResource("FilePersister_Image.png"), file);
	BufferedImage expected = ImageIO.read(getClass().getResource("FilePersister_Image.png"));
	BufferedImage actual = persister.loadScreenshot(metadata);
	assertArrayEquals(toRGB(expected), toRGB(actual));
}