@Test(groups = "Enterprise-only", expectedExceptions = UnsupportedOperationException.class) public void test110searchForNullUserMethod() throws Exception { UserSearchPage userCreated = new UserSearchPage(drone); userCreated.searchFor(null); Assert.fail("UnsupportedOperationException Expected"); }
public UserSearchPage searchFor(final String user) { if (user == null) { throw new UnsupportedOperationException("user name is required"); } WebElement input = drone.findAndWait(By.cssSelector(USER_SEARCH_BOX)); input.clear(); input.sendKeys(user); WebElement button = drone.findAndWait(By.cssSelector(USER_SEARCH_BUTTON)); button.click(); return new UserSearchPage(drone); }
UserSearchPage extends SharePage { public UserSearchPage searchFor(final String user) { if (user == null) { throw new UnsupportedOperationException("user name is required"); } WebElement input = drone.findAndWait(By.cssSelector(USER_SEARCH_BOX)); input.clear(); input.sendKeys(user); WebElement button = drone.findAndWait(By.cssSelector(USER_SEARCH_BUTTON)); button.click(); return new UserSearchPage(drone); } }
UserSearchPage extends SharePage { public UserSearchPage searchFor(final String user) { if (user == null) { throw new UnsupportedOperationException("user name is required"); } WebElement input = drone.findAndWait(By.cssSelector(USER_SEARCH_BOX)); input.clear(); input.sendKeys(user); WebElement button = drone.findAndWait(By.cssSelector(USER_SEARCH_BUTTON)); button.click(); return new UserSearchPage(drone); } UserSearchPage(WebDrone drone); }
UserSearchPage extends SharePage { public UserSearchPage searchFor(final String user) { if (user == null) { throw new UnsupportedOperationException("user name is required"); } WebElement input = drone.findAndWait(By.cssSelector(USER_SEARCH_BOX)); input.clear(); input.sendKeys(user); WebElement button = drone.findAndWait(By.cssSelector(USER_SEARCH_BUTTON)); button.click(); return new UserSearchPage(drone); } UserSearchPage(WebDrone drone); @SuppressWarnings("unchecked") @Override UserSearchPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override UserSearchPage render(); @SuppressWarnings("unchecked") @Override UserSearchPage render(final long time); UserSearchPage searchFor(final String user); String getResultsStatus(); boolean hasResults(); HtmlPage selectNewUser(); UploadFilePage selectUploadUserCSVFile(); UserSearchPage openUploadUserCSVFile(); HtmlPage uploadCVSFile(String filePath); List<String> getUploadedCVSUsernames(); UserSearchPage clickGoBack(); UserProfilePage clickOnUser(String userName); boolean isUserPresent(String userName); }
UserSearchPage extends SharePage { public UserSearchPage searchFor(final String user) { if (user == null) { throw new UnsupportedOperationException("user name is required"); } WebElement input = drone.findAndWait(By.cssSelector(USER_SEARCH_BOX)); input.clear(); input.sendKeys(user); WebElement button = drone.findAndWait(By.cssSelector(USER_SEARCH_BUTTON)); button.click(); return new UserSearchPage(drone); } UserSearchPage(WebDrone drone); @SuppressWarnings("unchecked") @Override UserSearchPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override UserSearchPage render(); @SuppressWarnings("unchecked") @Override UserSearchPage render(final long time); UserSearchPage searchFor(final String user); String getResultsStatus(); boolean hasResults(); HtmlPage selectNewUser(); UploadFilePage selectUploadUserCSVFile(); UserSearchPage openUploadUserCSVFile(); HtmlPage uploadCVSFile(String filePath); List<String> getUploadedCVSUsernames(); UserSearchPage clickGoBack(); UserProfilePage clickOnUser(String userName); boolean isUserPresent(String userName);  }