Guest User

Untitled

a guest
Oct 8th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. @Test
  2. public void testOne() {
  3. open("https://www.google.com/");
  4. ElementsCollection elementsCollection = getElementCollectionByTag("a");
  5. elementsCollection.forEach(data -> mapping(data));
  6.  
  7. System.out.println();
  8. closeWebDriver();
  9. }
  10.  
  11. private ElementsCollection getElementCollectionByTag(String tag) {
  12. return $$(By.xpath("//" + tag));
  13. }
  14.  
  15. private UserDTO mapping(Object object) {
  16. ModelMapper modelMapper = new ModelMapper();
  17. return modelMapper.map(object, UserDTO.class);
  18.  
  19. }
Add Comment
Please, Sign In to add comment