@Test(dependsOnMethods="getAddAbleCatgories", groups = {"Enterprise4.2"}) public void getAddAbleCatgoryList() { EditDocumentPropertiesPage propertiesPage = detailsPage.selectEditProperties().render(); CategoryPage categoryPage = propertiesPage.getCategory().render(); List<String> addAbleCategoryList = categoryPage.getAddAbleCatgoryList(); assertFalse(addAbleCategoryList.isEmpty(), "addable category list is empty."); assertTrue(addAbleCategoryList.contains(categoryTags), categoryTags + "is not in category list."); categoryPage.addCategories(Arrays.asList(categoryTags)).render(); categoryPage.addCategories(Arrays.asList(drone.getValue("category.english")), drone.getValue("category.languages")).render(); List<String> addedCategories = categoryPage.getAddedCatgoryList(); assertTrue(addedCategories.size() > 0); assertTrue(addedCategories.contains(categoryTags)); assertTrue(addedCategories.contains(drone.getValue("category.english"))); propertiesPage = categoryPage.clickCancel().render(); detailsPage = propertiesPage.selectCancel().render(); }
public List<String> getAddAbleCatgoryList() { List<String> categories = new ArrayList<>(); List<WebElement> elements = drone.findAndWaitForElements(AVAILABLE_CATEGORIES_TABLE); for (WebElement webElement : elements) { if (webElement.findElement(By.cssSelector(".addIcon")).isDisplayed()) { categories.add(webElement.findElement(By.cssSelector(".item-name>a")).getText()); } } return categories; }
CategoryPage extends AbstractEditProperties { public List<String> getAddAbleCatgoryList() { List<String> categories = new ArrayList<>(); List<WebElement> elements = drone.findAndWaitForElements(AVAILABLE_CATEGORIES_TABLE); for (WebElement webElement : elements) { if (webElement.findElement(By.cssSelector(".addIcon")).isDisplayed()) { categories.add(webElement.findElement(By.cssSelector(".item-name>a")).getText()); } } return categories; } }
CategoryPage extends AbstractEditProperties { public List<String> getAddAbleCatgoryList() { List<String> categories = new ArrayList<>(); List<WebElement> elements = drone.findAndWaitForElements(AVAILABLE_CATEGORIES_TABLE); for (WebElement webElement : elements) { if (webElement.findElement(By.cssSelector(".addIcon")).isDisplayed()) { categories.add(webElement.findElement(By.cssSelector(".item-name>a")).getText()); } } return categories; } CategoryPage(WebDrone drone); }
CategoryPage extends AbstractEditProperties { public List<String> getAddAbleCatgoryList() { List<String> categories = new ArrayList<>(); List<WebElement> elements = drone.findAndWaitForElements(AVAILABLE_CATEGORIES_TABLE); for (WebElement webElement : elements) { if (webElement.findElement(By.cssSelector(".addIcon")).isDisplayed()) { categories.add(webElement.findElement(By.cssSelector(".item-name>a")).getText()); } } return categories; } 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 List<String> getAddAbleCatgoryList() { List<String> categories = new ArrayList<>(); List<WebElement> elements = drone.findAndWaitForElements(AVAILABLE_CATEGORIES_TABLE); for (WebElement webElement : elements) { if (webElement.findElement(By.cssSelector(".addIcon")).isDisplayed()) { categories.add(webElement.findElement(By.cssSelector(".item-name>a")).getText()); } } return categories; } 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);  }