@Test(groups = { "Enterprise4.2" }, priority=7) public void test107TrashCanSelectCheckBox() { trashCan = getTrashCan(); List<TrashCanItem> item1 = trashCan.getTrashCanItemForContent(TrashCanValues.FILE,fileName4, "documentLibrary"); if(item1.size() <= 1) { trashCan= item1.get(0).selectTrashCanItemCheckBox(); Assert.assertTrue(item1.get(0).isCheckBoxSelected()); } else { Assert.fail("Cannot find unique file"); } }
public List<TrashCanItem> getTrashCanItemForContent(TrashCanValues trashCanFileType, String contentName, String contentPath) throws PageOperationException { List<TrashCanItem> trashCanItemList = getTrashCanItems(); List<TrashCanItem> item = Collections.emptyList(); if (!trashCanItemList.isEmpty()) { item = new ArrayList<TrashCanItem>(); for (TrashCanItem itemElement : trashCanItemList) { if (itemElement.getFileName().equalsIgnoreCase(contentName) && itemElement.getFolderPath().contains(contentPath)) { switch (trashCanFileType) { case FILE: if (itemElement.isTrashCanItemFile()) { item.add(itemElement); break; } case FOLDER: if (itemElement.isTrashCanItemFolder()) { item.add(itemElement); break; } case SITE: if (itemElement.isTrashCanItemSite()) { item.add(itemElement); break; } default: break; } } } } return item; }
TrashCanPage extends SharePage { public List<TrashCanItem> getTrashCanItemForContent(TrashCanValues trashCanFileType, String contentName, String contentPath) throws PageOperationException { List<TrashCanItem> trashCanItemList = getTrashCanItems(); List<TrashCanItem> item = Collections.emptyList(); if (!trashCanItemList.isEmpty()) { item = new ArrayList<TrashCanItem>(); for (TrashCanItem itemElement : trashCanItemList) { if (itemElement.getFileName().equalsIgnoreCase(contentName) && itemElement.getFolderPath().contains(contentPath)) { switch (trashCanFileType) { case FILE: if (itemElement.isTrashCanItemFile()) { item.add(itemElement); break; } case FOLDER: if (itemElement.isTrashCanItemFolder()) { item.add(itemElement); break; } case SITE: if (itemElement.isTrashCanItemSite()) { item.add(itemElement); break; } default: break; } } } } return item; } }
TrashCanPage extends SharePage { public List<TrashCanItem> getTrashCanItemForContent(TrashCanValues trashCanFileType, String contentName, String contentPath) throws PageOperationException { List<TrashCanItem> trashCanItemList = getTrashCanItems(); List<TrashCanItem> item = Collections.emptyList(); if (!trashCanItemList.isEmpty()) { item = new ArrayList<TrashCanItem>(); for (TrashCanItem itemElement : trashCanItemList) { if (itemElement.getFileName().equalsIgnoreCase(contentName) && itemElement.getFolderPath().contains(contentPath)) { switch (trashCanFileType) { case FILE: if (itemElement.isTrashCanItemFile()) { item.add(itemElement); break; } case FOLDER: if (itemElement.isTrashCanItemFolder()) { item.add(itemElement); break; } case SITE: if (itemElement.isTrashCanItemSite()) { item.add(itemElement); break; } default: break; } } } } return item; } TrashCanPage(WebDrone drone); }
TrashCanPage extends SharePage { public List<TrashCanItem> getTrashCanItemForContent(TrashCanValues trashCanFileType, String contentName, String contentPath) throws PageOperationException { List<TrashCanItem> trashCanItemList = getTrashCanItems(); List<TrashCanItem> item = Collections.emptyList(); if (!trashCanItemList.isEmpty()) { item = new ArrayList<TrashCanItem>(); for (TrashCanItem itemElement : trashCanItemList) { if (itemElement.getFileName().equalsIgnoreCase(contentName) && itemElement.getFolderPath().contains(contentPath)) { switch (trashCanFileType) { case FILE: if (itemElement.isTrashCanItemFile()) { item.add(itemElement); break; } case FOLDER: if (itemElement.isTrashCanItemFolder()) { item.add(itemElement); break; } case SITE: if (itemElement.isTrashCanItemSite()) { item.add(itemElement); break; } default: break; } } } } return item; } TrashCanPage(WebDrone drone); @SuppressWarnings("unchecked") TrashCanPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override TrashCanPage render(long time); @SuppressWarnings("unchecked") @Override TrashCanPage render(); ProfileNavigation getProfileNav(); HtmlPage itemSearch(String searchText); HtmlPage clearSearch(); boolean hasTrashCanItems(); List<TrashCanItem> getTrashCanItems(); List<TrashCanItem> getTrashCanItemForContent(TrashCanValues trashCanFileType, String contentName, String contentPath); TrashCanEmptyConfirmationPage selectEmpty(); TrashCanRecoverConfirmDialog selectedRecover(); TrashCanDeleteConfirmationPage selectedDelete(); HtmlPage selectAction(SelectActions selectAction); boolean hasNextPage(); boolean hasPreviousPage(); HtmlPage selectNextPage(); HtmlPage selectPreviousPage(); boolean checkNoItemsMessage(); boolean isPageCorrect(); }
TrashCanPage extends SharePage { public List<TrashCanItem> getTrashCanItemForContent(TrashCanValues trashCanFileType, String contentName, String contentPath) throws PageOperationException { List<TrashCanItem> trashCanItemList = getTrashCanItems(); List<TrashCanItem> item = Collections.emptyList(); if (!trashCanItemList.isEmpty()) { item = new ArrayList<TrashCanItem>(); for (TrashCanItem itemElement : trashCanItemList) { if (itemElement.getFileName().equalsIgnoreCase(contentName) && itemElement.getFolderPath().contains(contentPath)) { switch (trashCanFileType) { case FILE: if (itemElement.isTrashCanItemFile()) { item.add(itemElement); break; } case FOLDER: if (itemElement.isTrashCanItemFolder()) { item.add(itemElement); break; } case SITE: if (itemElement.isTrashCanItemSite()) { item.add(itemElement); break; } default: break; } } } } return item; } TrashCanPage(WebDrone drone); @SuppressWarnings("unchecked") TrashCanPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override TrashCanPage render(long time); @SuppressWarnings("unchecked") @Override TrashCanPage render(); ProfileNavigation getProfileNav(); HtmlPage itemSearch(String searchText); HtmlPage clearSearch(); boolean hasTrashCanItems(); List<TrashCanItem> getTrashCanItems(); List<TrashCanItem> getTrashCanItemForContent(TrashCanValues trashCanFileType, String contentName, String contentPath); TrashCanEmptyConfirmationPage selectEmpty(); TrashCanRecoverConfirmDialog selectedRecover(); TrashCanDeleteConfirmationPage selectedDelete(); HtmlPage selectAction(SelectActions selectAction); boolean hasNextPage(); boolean hasPreviousPage(); HtmlPage selectNextPage(); HtmlPage selectPreviousPage(); boolean checkNoItemsMessage(); boolean isPageCorrect();  }