Skip to content

nicegraham/SeleniumScreenSnapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Screenshots with WebElement highlighting and thumbnails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published