@Test(groups = "Hybrid", dependsOnMethods = "verifyDestinationDetails") public void isNoItemsFoundMessageDisplayed() { assignmentPage = cloudTaskOrReviewPage.selectAssignmentPage().render(); Assert.assertTrue(assignmentPage.isNoItemsFoundMessageDisplayed("RandomUserString")); Assert.assertFalse(assignmentPage.isNoItemsFoundMessageDisplayed(cloudUserName)); }
public boolean isNoItemsFoundMessageDisplayed(String userName) { if (StringUtils.isEmpty(userName)) { throw new IllegalArgumentException("UserName cannot be null"); } try { searchForUser(userName); WebElement message = drone.find(By.cssSelector("div[id$='ssignment-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div, div[id$='_assignee-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div")); return message.isDisplayed() && message.getText().equals("No items found"); } catch (NoSuchElementException nse) { return false; } }
AssignmentPage extends SharePage { public boolean isNoItemsFoundMessageDisplayed(String userName) { if (StringUtils.isEmpty(userName)) { throw new IllegalArgumentException("UserName cannot be null"); } try { searchForUser(userName); WebElement message = drone.find(By.cssSelector("div[id$='ssignment-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div, div[id$='_assignee-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div")); return message.isDisplayed() && message.getText().equals("No items found"); } catch (NoSuchElementException nse) { return false; } } }
AssignmentPage extends SharePage { public boolean isNoItemsFoundMessageDisplayed(String userName) { if (StringUtils.isEmpty(userName)) { throw new IllegalArgumentException("UserName cannot be null"); } try { searchForUser(userName); WebElement message = drone.find(By.cssSelector("div[id$='ssignment-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div, div[id$='_assignee-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div")); return message.isDisplayed() && message.getText().equals("No items found"); } catch (NoSuchElementException nse) { return false; } } AssignmentPage(WebDrone drone); }
AssignmentPage extends SharePage { public boolean isNoItemsFoundMessageDisplayed(String userName) { if (StringUtils.isEmpty(userName)) { throw new IllegalArgumentException("UserName cannot be null"); } try { searchForUser(userName); WebElement message = drone.find(By.cssSelector("div[id$='ssignment-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div, div[id$='_assignee-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div")); return message.isDisplayed() && message.getText().equals("No items found"); } catch (NoSuchElementException nse) { return false; } } AssignmentPage(WebDrone drone); @SuppressWarnings("unchecked") @Override AssignmentPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override AssignmentPage render(); @SuppressWarnings("unchecked") @Override AssignmentPage render(final long time); void selectUsers(List<String> userNames); @Deprecated void selectUserWithRetry(String userName); boolean selectUser(String userName); HtmlPage selectReviewers(List<String> userNames); void selectAssignee(String userName); void selectOKButton(); List<WebElement> retrieveUsers(String userName); void searchForUser(String userName); boolean isNoItemsFoundMessageDisplayed(String userName); boolean isUserFound(String userName); boolean isEnterASearchTermMessageDisplayed(); void clearSearchField(); void selectSearchButton(); String getWarningMessage(); String getContent(); List<String> getUserList(String userName); boolean isAddIconPresent(String userName); boolean isUserSelected(String userName); void removeUser(String userName); void removeUsers(List<String> userNames); void selectCloseButton(); void selectCancelButton(); }
AssignmentPage extends SharePage { public boolean isNoItemsFoundMessageDisplayed(String userName) { if (StringUtils.isEmpty(userName)) { throw new IllegalArgumentException("UserName cannot be null"); } try { searchForUser(userName); WebElement message = drone.find(By.cssSelector("div[id$='ssignment-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div, div[id$='_assignee-cntrl-picker-left']>div[id$='-cntrl-picker-results']>table>tbody.yui-dt-message>tr div")); return message.isDisplayed() && message.getText().equals("No items found"); } catch (NoSuchElementException nse) { return false; } } AssignmentPage(WebDrone drone); @SuppressWarnings("unchecked") @Override AssignmentPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override AssignmentPage render(); @SuppressWarnings("unchecked") @Override AssignmentPage render(final long time); void selectUsers(List<String> userNames); @Deprecated void selectUserWithRetry(String userName); boolean selectUser(String userName); HtmlPage selectReviewers(List<String> userNames); void selectAssignee(String userName); void selectOKButton(); List<WebElement> retrieveUsers(String userName); void searchForUser(String userName); boolean isNoItemsFoundMessageDisplayed(String userName); boolean isUserFound(String userName); boolean isEnterASearchTermMessageDisplayed(); void clearSearchField(); void selectSearchButton(); String getWarningMessage(); String getContent(); List<String> getUserList(String userName); boolean isAddIconPresent(String userName); boolean isUserSelected(String userName); void removeUser(String userName); void removeUsers(List<String> userNames); void selectCloseButton(); void selectCancelButton();  }