@Test(dependsOnMethods = "editAnItem") public void testSelectItems() { dataListPage.select(SELECT_ALL); assertTrue(contactList.isCheckBoxSelected(text) && contactList.isCheckBoxSelected(editedText), "Items were not selected"); dataListPage.select(SELECT_NONE); assertFalse(contactList.isCheckBoxSelected(text) && contactList.isCheckBoxSelected(editedText), "Items are still selected"); contactList.selectAnItem(text); assertTrue(contactList.isCheckBoxSelected(text), "Item isn't selected"); dataListPage.select(INVERT_SELECT); assertTrue(contactList.isCheckBoxSelected(editedText), "The selection wasn't inverted"); assertFalse(contactList.isCheckBoxSelected(text), "The selection wasn't inverted"); }
public DataListPage select(selectOptions option) { logger.info("Selecting " + option); try { clickSelectDropDown(); if (isSelectMenuVisible()) { drone.findAndWait(option.getLocator()).click(); return drone.getCurrentPage().render(); } else { throw new PageException("Select dropdown menu not visible"); } } catch (TimeoutException e) { String exceptionMessage = "Not able to find select All option"; logger.error(exceptionMessage, e); throw new PageException(exceptionMessage); } }
DataListPage extends AbstractDataList { public DataListPage select(selectOptions option) { logger.info("Selecting " + option); try { clickSelectDropDown(); if (isSelectMenuVisible()) { drone.findAndWait(option.getLocator()).click(); return drone.getCurrentPage().render(); } else { throw new PageException("Select dropdown menu not visible"); } } catch (TimeoutException e) { String exceptionMessage = "Not able to find select All option"; logger.error(exceptionMessage, e); throw new PageException(exceptionMessage); } } }
DataListPage extends AbstractDataList { public DataListPage select(selectOptions option) { logger.info("Selecting " + option); try { clickSelectDropDown(); if (isSelectMenuVisible()) { drone.findAndWait(option.getLocator()).click(); return drone.getCurrentPage().render(); } else { throw new PageException("Select dropdown menu not visible"); } } catch (TimeoutException e) { String exceptionMessage = "Not able to find select All option"; logger.error(exceptionMessage, e); throw new PageException(exceptionMessage); } } DataListPage(WebDrone drone); }
DataListPage extends AbstractDataList { public DataListPage select(selectOptions option) { logger.info("Selecting " + option); try { clickSelectDropDown(); if (isSelectMenuVisible()) { drone.findAndWait(option.getLocator()).click(); return drone.getCurrentPage().render(); } else { throw new PageException("Select dropdown menu not visible"); } } catch (TimeoutException e) { String exceptionMessage = "Not able to find select All option"; logger.error(exceptionMessage, e); throw new PageException(exceptionMessage); } } 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 DataListPage select(selectOptions option) { logger.info("Selecting " + option); try { clickSelectDropDown(); if (isSelectMenuVisible()) { drone.findAndWait(option.getLocator()).click(); return drone.getCurrentPage().render(); } else { throw new PageException("Select dropdown menu not visible"); } } catch (TimeoutException e) { String exceptionMessage = "Not able to find select All option"; logger.error(exceptionMessage, e); throw new PageException(exceptionMessage); } } 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);  }