@Test(dependsOnMethods = "testSelectItems") public void testSelectedItemsActions() { int expCount = contactList.getItemsCount(); dataListPage.chooseSelectedItemOpt(DUPLICATE); assertEquals(contactList.getItemsCount(), expCount+1, "The item wasn't duplicated"); dataListPage.chooseSelectedItemOpt(DELETE); contactList.confirmDelete(); assertEquals(contactList.getItemsCount(), expCount, "The item wasn't deleted"); dataListPage.selectAnItem(editedText); dataListPage.chooseSelectedItemOpt(DESELECT_ALL); assertFalse(contactList.isCheckBoxSelected(editedText) && contactList.isCheckBoxSelected(text), "The items were not deselected"); }
public SharePage chooseSelectedItemOpt(selectedItemsOptions option) { logger.info("Selecting " + option); try { if(isSelectedItemsDropDwnEnabled()) { clickSelectedItemsDropDwn(); drone.findAndWait(option.getLocator()).click(); waitUntilAlert(); } else { throw new UnsupportedOperationException("None Items are selected"); } } catch (TimeoutException e) { throw new PageException("Unable to find the " + option.getLocator()); } return drone.getCurrentPage().render(); }
DataListPage extends AbstractDataList { public SharePage chooseSelectedItemOpt(selectedItemsOptions option) { logger.info("Selecting " + option); try { if(isSelectedItemsDropDwnEnabled()) { clickSelectedItemsDropDwn(); drone.findAndWait(option.getLocator()).click(); waitUntilAlert(); } else { throw new UnsupportedOperationException("None Items are selected"); } } catch (TimeoutException e) { throw new PageException("Unable to find the " + option.getLocator()); } return drone.getCurrentPage().render(); } }
DataListPage extends AbstractDataList { public SharePage chooseSelectedItemOpt(selectedItemsOptions option) { logger.info("Selecting " + option); try { if(isSelectedItemsDropDwnEnabled()) { clickSelectedItemsDropDwn(); drone.findAndWait(option.getLocator()).click(); waitUntilAlert(); } else { throw new UnsupportedOperationException("None Items are selected"); } } catch (TimeoutException e) { throw new PageException("Unable to find the " + option.getLocator()); } return drone.getCurrentPage().render(); } DataListPage(WebDrone drone); }
DataListPage extends AbstractDataList { public SharePage chooseSelectedItemOpt(selectedItemsOptions option) { logger.info("Selecting " + option); try { if(isSelectedItemsDropDwnEnabled()) { clickSelectedItemsDropDwn(); drone.findAndWait(option.getLocator()).click(); waitUntilAlert(); } else { throw new UnsupportedOperationException("None Items are selected"); } } catch (TimeoutException e) { throw new PageException("Unable to find the " + option.getLocator()); } return drone.getCurrentPage().render(); } DataListPage(WebDrone drone); @SuppressWarnings("unchecked") @Override DataListPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override DataListPage render(); @SuppressWarnings("unchecked") @Override DataListPage render(long time); DataListPage createDataList(DataLists listType, String title, String desc); void selectDataList(String name); boolean isNewListEnabled(); DataListDirectoryInfo getDataListDirectoryInfo(final String title); DataListPage editDataList(String oldTitle, String newTitle, String newDescription); DataListPage deleteDataListWithConfirm(String title); int getListsCount(); boolean isEditDataListDisplayed(String list); boolean isDeleteDataListDisplayed(String list); String getDataListDescription(String title); boolean isNoListFoundDisplayed(); DataListPage clickCancel(); List<String> getLists(); DataListTreeMenuNavigation getLeftMenus(); boolean isSelectMenuVisible(); DataListPage select(selectOptions option); SharePage chooseSelectedItemOpt(selectedItemsOptions option); }
DataListPage extends AbstractDataList { public SharePage chooseSelectedItemOpt(selectedItemsOptions option) { logger.info("Selecting " + option); try { if(isSelectedItemsDropDwnEnabled()) { clickSelectedItemsDropDwn(); drone.findAndWait(option.getLocator()).click(); waitUntilAlert(); } else { throw new UnsupportedOperationException("None Items are selected"); } } catch (TimeoutException e) { throw new PageException("Unable to find the " + option.getLocator()); } return drone.getCurrentPage().render(); } DataListPage(WebDrone drone); @SuppressWarnings("unchecked") @Override DataListPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override DataListPage render(); @SuppressWarnings("unchecked") @Override DataListPage render(long time); DataListPage createDataList(DataLists listType, String title, String desc); void selectDataList(String name); boolean isNewListEnabled(); DataListDirectoryInfo getDataListDirectoryInfo(final String title); DataListPage editDataList(String oldTitle, String newTitle, String newDescription); DataListPage deleteDataListWithConfirm(String title); int getListsCount(); boolean isEditDataListDisplayed(String list); boolean isDeleteDataListDisplayed(String list); String getDataListDescription(String title); boolean isNoListFoundDisplayed(); DataListPage clickCancel(); List<String> getLists(); DataListTreeMenuNavigation getLeftMenus(); boolean isSelectMenuVisible(); DataListPage select(selectOptions option); SharePage chooseSelectedItemOpt(selectedItemsOptions option);  }