Takes screenshots of the browser and highlights WebElements.
You can highlight a single weblement in the browser or a bunch of them.
driver.get("http://www.google.com");
WebElement searchbox = driver.findElement(By.name("q"));
screenSnapper.screenshot(searchbox);
Screenshot:
thumbnail:
searchbox.sendKeys("cheese");
WebElement searchButton = wait.until(visibilityOfElementLocated(By.name("btnG")));
searchButton.click();
wait.until(visibilityOfElementLocated(By.className("navend")));
List<WebElement> results = driver.findElements(By.className("g"));
screenSnapper.screenshot(results);
Screenshot:
thumbnail 1:
thumbnail 2: