Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.26 KB

README.md

File metadata and controls

35 lines (22 loc) · 1.26 KB

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:

Searchbox highlighted

thumbnail:

Searchbox 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:

results highlighted

thumbnail 1:

result 1 thumbnail

thumbnail 2:

result 2 thumbnail etc.