Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void testOne() {
- open("https://www.google.com/");
- ElementsCollection elementsCollection = getElementCollectionByTag("a");
- elementsCollection.forEach(data -> mapping(data));
- System.out.println();
- closeWebDriver();
- }
- private ElementsCollection getElementCollectionByTag(String tag) {
- return $$(By.xpath("//" + tag));
- }
- private UserDTO mapping(Object object) {
- ModelMapper modelMapper = new ModelMapper();
- return modelMapper.map(object, UserDTO.class);
- }
Add Comment
Please, Sign In to add comment