@Test(dependsOnMethods = "deleteNullUserMethod") public void deleteUser() throws Exception { page = dashBoard.getNav().getUsersPage().render(); Assert.assertTrue(page.isLogoPresent()); Assert.assertTrue(page.isTitlePresent()); results = page.searchFor(userinfo).render(); Assert.assertTrue(results.hasResults()); UserProfilePage userProfile = results.clickOnUser(userinfo).render(); results = userProfile.deleteUser().render(); results = page.searchFor(userinfo).render(); Assert.assertFalse(results.hasResults()); }
public UserSearchPage deleteUser() { try { drone.findAndWait(deleteUser).click(); List<WebElement> buttons = getButtons(); for (WebElement button : buttons) { if (button.getText().equalsIgnoreCase("Delete")) { button.click(); return new UserSearchPage(drone); } } } catch (TimeoutException te) { } throw new PageException("Not able to find the Delete User Button."); }
UserProfilePage extends SharePage { public UserSearchPage deleteUser() { try { drone.findAndWait(deleteUser).click(); List<WebElement> buttons = getButtons(); for (WebElement button : buttons) { if (button.getText().equalsIgnoreCase("Delete")) { button.click(); return new UserSearchPage(drone); } } } catch (TimeoutException te) { } throw new PageException("Not able to find the Delete User Button."); } }
UserProfilePage extends SharePage { public UserSearchPage deleteUser() { try { drone.findAndWait(deleteUser).click(); List<WebElement> buttons = getButtons(); for (WebElement button : buttons) { if (button.getText().equalsIgnoreCase("Delete")) { button.click(); return new UserSearchPage(drone); } } } catch (TimeoutException te) { } throw new PageException("Not able to find the Delete User Button."); } UserProfilePage(WebDrone drone); }
UserProfilePage extends SharePage { public UserSearchPage deleteUser() { try { drone.findAndWait(deleteUser).click(); List<WebElement> buttons = getButtons(); for (WebElement button : buttons) { if (button.getText().equalsIgnoreCase("Delete")) { button.click(); return new UserSearchPage(drone); } } } catch (TimeoutException te) { } throw new PageException("Not able to find the Delete User Button."); } UserProfilePage(WebDrone drone); @SuppressWarnings("unchecked") @Override UserProfilePage render(RenderTime timer); @SuppressWarnings("unchecked") @Override UserProfilePage render(); @SuppressWarnings("unchecked") @Override UserProfilePage render(final long time); UserSearchPage deleteUser(); EditUserPage selectEditUser(); UserSearchPage selectGoBack(); }
UserProfilePage extends SharePage { public UserSearchPage deleteUser() { try { drone.findAndWait(deleteUser).click(); List<WebElement> buttons = getButtons(); for (WebElement button : buttons) { if (button.getText().equalsIgnoreCase("Delete")) { button.click(); return new UserSearchPage(drone); } } } catch (TimeoutException te) { } throw new PageException("Not able to find the Delete User Button."); } UserProfilePage(WebDrone drone); @SuppressWarnings("unchecked") @Override UserProfilePage render(RenderTime timer); @SuppressWarnings("unchecked") @Override UserProfilePage render(); @SuppressWarnings("unchecked") @Override UserProfilePage render(final long time); UserSearchPage deleteUser(); EditUserPage selectEditUser(); UserSearchPage selectGoBack();  }