@Test (dependsOnMethods = "testFolderDetailsPanelsNotCorrect", groups = { "alfresco-one" }) public void verifyPropertiesSection() { Assert.assertTrue(folderDetailsPage.isPropertiesLabelsPresent(), "Labels of Properties section display incorrectly"); }
public boolean isPropertiesLabelsPresent() { boolean present = false; try { List<WebElement> labels = drone.findAll(By.xpath(PROPERTIES_INFO)); if(labels.size() != 3) throw new Exception("Properties section doesn't contain full information"); for(WebElement label : labels) { present = false; for(String labelName : new String[]{"Name:", "Title:", "Description:"}) { if(label.getText().equals(labelName)) present = true; } if (!present) return false; } } catch (StaleElementReferenceException sere) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", sere); } catch (NoSuchElementException nse) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", nse); } catch (Exception e) { logger.error("Properties section doesn't contain full information"); } return present; }
FolderDetailsPage extends DetailsPage { public boolean isPropertiesLabelsPresent() { boolean present = false; try { List<WebElement> labels = drone.findAll(By.xpath(PROPERTIES_INFO)); if(labels.size() != 3) throw new Exception("Properties section doesn't contain full information"); for(WebElement label : labels) { present = false; for(String labelName : new String[]{"Name:", "Title:", "Description:"}) { if(label.getText().equals(labelName)) present = true; } if (!present) return false; } } catch (StaleElementReferenceException sere) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", sere); } catch (NoSuchElementException nse) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", nse); } catch (Exception e) { logger.error("Properties section doesn't contain full information"); } return present; } }
FolderDetailsPage extends DetailsPage { public boolean isPropertiesLabelsPresent() { boolean present = false; try { List<WebElement> labels = drone.findAll(By.xpath(PROPERTIES_INFO)); if(labels.size() != 3) throw new Exception("Properties section doesn't contain full information"); for(WebElement label : labels) { present = false; for(String labelName : new String[]{"Name:", "Title:", "Description:"}) { if(label.getText().equals(labelName)) present = true; } if (!present) return false; } } catch (StaleElementReferenceException sere) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", sere); } catch (NoSuchElementException nse) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", nse); } catch (Exception e) { logger.error("Properties section doesn't contain full information"); } return present; } FolderDetailsPage(WebDrone drone); }
FolderDetailsPage extends DetailsPage { public boolean isPropertiesLabelsPresent() { boolean present = false; try { List<WebElement> labels = drone.findAll(By.xpath(PROPERTIES_INFO)); if(labels.size() != 3) throw new Exception("Properties section doesn't contain full information"); for(WebElement label : labels) { present = false; for(String labelName : new String[]{"Name:", "Title:", "Description:"}) { if(label.getText().equals(labelName)) present = true; } if (!present) return false; } } catch (StaleElementReferenceException sere) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", sere); } catch (NoSuchElementException nse) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", nse); } catch (Exception e) { logger.error("Properties section doesn't contain full information"); } return present; } FolderDetailsPage(WebDrone drone); @SuppressWarnings("unchecked") @Override synchronized FolderDetailsPage render(); @SuppressWarnings("unchecked") @Override synchronized FolderDetailsPage render(long time); @SuppressWarnings("unchecked") @Override synchronized FolderDetailsPage render(RenderTime timer); boolean isCorrectPath(String folderName); boolean isTagPanelPresent(); boolean isFolderActionsPresent(); FolderDetailsPage selectDownloadFolderAsZip(String type); ChangeTypePage selectChangeType(); boolean isCommentAddedAndRemoved(String comment); boolean isDownloadAsZipAtTopRight(); List<String> getFolderActionList(); boolean isViewOnGoogleMapsLinkVisible(); List<WebElement> getEditControls(); static boolean IsModifierDisplayed(WebDrone drone, String userName); FolderRulesPage selectManageRules(); boolean isPropertiesLabelsPresent(); }
FolderDetailsPage extends DetailsPage { public boolean isPropertiesLabelsPresent() { boolean present = false; try { List<WebElement> labels = drone.findAll(By.xpath(PROPERTIES_INFO)); if(labels.size() != 3) throw new Exception("Properties section doesn't contain full information"); for(WebElement label : labels) { present = false; for(String labelName : new String[]{"Name:", "Title:", "Description:"}) { if(label.getText().equals(labelName)) present = true; } if (!present) return false; } } catch (StaleElementReferenceException sere) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", sere); } catch (NoSuchElementException nse) { logger.error("Element :" + PROPERTIES_INFO + " does not exist", nse); } catch (Exception e) { logger.error("Properties section doesn't contain full information"); } return present; } FolderDetailsPage(WebDrone drone); @SuppressWarnings("unchecked") @Override synchronized FolderDetailsPage render(); @SuppressWarnings("unchecked") @Override synchronized FolderDetailsPage render(long time); @SuppressWarnings("unchecked") @Override synchronized FolderDetailsPage render(RenderTime timer); boolean isCorrectPath(String folderName); boolean isTagPanelPresent(); boolean isFolderActionsPresent(); FolderDetailsPage selectDownloadFolderAsZip(String type); ChangeTypePage selectChangeType(); boolean isCommentAddedAndRemoved(String comment); boolean isDownloadAsZipAtTopRight(); List<String> getFolderActionList(); boolean isViewOnGoogleMapsLinkVisible(); List<WebElement> getEditControls(); static boolean IsModifierDisplayed(WebDrone drone, String userName); FolderRulesPage selectManageRules(); boolean isPropertiesLabelsPresent();  }