@SuppressWarnings("unchecked") @Test(dependsOnMethods="clickCancel", groups = {"Enterprise4.2"}) public void clickOk() { EditDocumentPropertiesPage propertiesPage = detailsPage.selectEditProperties().render(); CategoryPage categoryPage = propertiesPage.getCategory().render(); categoryPage.addCategories(Arrays.asList(categoryTags, categoryRegions)); List<String> addedCategoryList = categoryPage.getAddedCatgoryList(); assertTrue(addedCategoryList.size() > 0); assertTrue(addedCategoryList.contains(categoryTags)); propertiesPage = categoryPage.clickOk().render(); addedCategoryList = propertiesPage.getCategoryList(); assertTrue(addedCategoryList.size() > 0); assertTrue(addedCategoryList.contains(categoryTags)); categoryPage = propertiesPage.getCategory().render(); addedCategoryList = categoryPage.getAddedCatgoryList(); assertTrue(addedCategoryList.size() > 0); assertTrue(addedCategoryList.contains(categoryTags)); propertiesPage = categoryPage.clickCancel().render(); detailsPage = propertiesPage.selectSave().render(); List<Categories> addedCategories = (List<Categories>) detailsPage.getProperties().get("Categories"); assertTrue(addedCategories.size() == 2); for (Categories category : addedCategories) { Arrays.asList(categoryTags, categoryRegions).contains(category); } documentLibPage = detailsPage.getSiteNav().selectSiteDocumentLibrary().render(); documentLibPage.setViewType(ViewType.DETAILED_VIEW); FileDirectoryInfo directoryInfo = documentLibPage.getFileDirectoryInfo("Test Doc"); addedCategoryList = directoryInfo.getCategoryList(); assertTrue(addedCategoryList.size() > 0); assertTrue(addedCategoryList.contains(categoryTags)); }
public HtmlPage clickOk() { try { drone.find(OK_BUTTON).click(); return drone.getCurrentPage(); } catch (NoSuchElementException nse) { throw new PageException("Not able find the ok button: ", nse); } }
CategoryPage extends AbstractEditProperties { public HtmlPage clickOk() { try { drone.find(OK_BUTTON).click(); return drone.getCurrentPage(); } catch (NoSuchElementException nse) { throw new PageException("Not able find the ok button: ", nse); } } }
CategoryPage extends AbstractEditProperties { public HtmlPage clickOk() { try { drone.find(OK_BUTTON).click(); return drone.getCurrentPage(); } catch (NoSuchElementException nse) { throw new PageException("Not able find the ok button: ", nse); } } CategoryPage(WebDrone drone); }
CategoryPage extends AbstractEditProperties { public HtmlPage clickOk() { try { drone.find(OK_BUTTON).click(); return drone.getCurrentPage(); } catch (NoSuchElementException nse) { throw new PageException("Not able find the ok button: ", nse); } } CategoryPage(WebDrone drone); @SuppressWarnings("unchecked") @Override CategoryPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override CategoryPage render(long time); @SuppressWarnings("unchecked") @Override CategoryPage render(); boolean isCategoryPageVisible(); @Deprecated HtmlPage remove(List<Categories> categories); HtmlPage removeCategories(List<String> categories, String... parentCategories); @Deprecated HtmlPage add(List<Categories> categories); HtmlPage addCategories(List<String> categories, String... parentCategories); @Deprecated List<Categories> getAddAbleCatgories(); List<String> getAddAbleCatgoryList(); @Deprecated List<Categories> getAddedCatgories(); List<String> getAddedCatgoryList(); HtmlPage clickCancel(); HtmlPage clickOk(); @Deprecated void openSubCategories(Categories category); void openSubCategories(String category); }
CategoryPage extends AbstractEditProperties { public HtmlPage clickOk() { try { drone.find(OK_BUTTON).click(); return drone.getCurrentPage(); } catch (NoSuchElementException nse) { throw new PageException("Not able find the ok button: ", nse); } } CategoryPage(WebDrone drone); @SuppressWarnings("unchecked") @Override CategoryPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override CategoryPage render(long time); @SuppressWarnings("unchecked") @Override CategoryPage render(); boolean isCategoryPageVisible(); @Deprecated HtmlPage remove(List<Categories> categories); HtmlPage removeCategories(List<String> categories, String... parentCategories); @Deprecated HtmlPage add(List<Categories> categories); HtmlPage addCategories(List<String> categories, String... parentCategories); @Deprecated List<Categories> getAddAbleCatgories(); List<String> getAddAbleCatgoryList(); @Deprecated List<Categories> getAddedCatgories(); List<String> getAddedCatgoryList(); HtmlPage clickCancel(); HtmlPage clickOk(); @Deprecated void openSubCategories(Categories category); void openSubCategories(String category);  }