Skip to content

Instantly share code, notes, and snippets.

@lordofthejars
Created September 16, 2014 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lordofthejars/3cc635b465e4ff8a10b9 to your computer and use it in GitHub Desktop.
Save lordofthejars/3cc635b465e4ff8a10b9 to your computer and use it in GitHub Desktop.
List<WebElement> elements = session.findElements(xpath("//table/tbody/tr/td/span[@class='title']"));
return elements.stream().map(WebElement::getText).collect(Collectors.toList());
@bartoszmajsak
Copy link

Well... you could do that with Guava transformers since years. Not a killer Java 8 feature imho ;)

@lordofthejars
Copy link
Author

yes but you get a 2MB library with a lot of functionalities just for this :S I prefer Java 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment