@Test(dependsOnMethods = "selectNode", groups = "alfresco-one", priority = 2) public void selectTagNode() throws Exception { TreeMenuNavigation treeMenuNav = documentLibPage.getLeftMenus(); documentLibPage = treeMenuNav.selectTagNode(tagName).render(); List<FileDirectoryInfo> files = documentLibPage.getFiles(); assertTrue(files.size() == 1); assertEquals(files.get(0).getName(), file2.getName()); }
public HtmlPage selectTagNode(String tagName) { if (tagName == null) { throw new IllegalArgumentException("Tag name is required."); } tagName = tagName.toLowerCase(); String xpath = TreeMenu.TAGS.getXpath() + String.format(TAG_NODE, tagName); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); drone.waitForPageLoad(WAIT_TIME_3000); } catch (NoSuchElementException e) { throw new PageOperationException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone); }
TreeMenuNavigation extends SharePage { public HtmlPage selectTagNode(String tagName) { if (tagName == null) { throw new IllegalArgumentException("Tag name is required."); } tagName = tagName.toLowerCase(); String xpath = TreeMenu.TAGS.getXpath() + String.format(TAG_NODE, tagName); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); drone.waitForPageLoad(WAIT_TIME_3000); } catch (NoSuchElementException e) { throw new PageOperationException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone); } }
TreeMenuNavigation extends SharePage { public HtmlPage selectTagNode(String tagName) { if (tagName == null) { throw new IllegalArgumentException("Tag name is required."); } tagName = tagName.toLowerCase(); String xpath = TreeMenu.TAGS.getXpath() + String.format(TAG_NODE, tagName); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); drone.waitForPageLoad(WAIT_TIME_3000); } catch (NoSuchElementException e) { throw new PageOperationException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone); } TreeMenuNavigation(WebDrone drone); }
TreeMenuNavigation extends SharePage { public HtmlPage selectTagNode(String tagName) { if (tagName == null) { throw new IllegalArgumentException("Tag name is required."); } tagName = tagName.toLowerCase(); String xpath = TreeMenu.TAGS.getXpath() + String.format(TAG_NODE, tagName); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); drone.waitForPageLoad(WAIT_TIME_3000); } catch (NoSuchElementException e) { throw new PageOperationException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone); } TreeMenuNavigation(WebDrone drone); @SuppressWarnings("unchecked") @Override TreeMenuNavigation render(RenderTime timer); @SuppressWarnings("unchecked") @Override TreeMenuNavigation render(); @SuppressWarnings("unchecked") @Override TreeMenuNavigation render(final long time); HtmlPage selectDocumentNode(DocumentsMenu docMenu); HtmlPage selectTagNode(String tagName); HtmlPage selectNode(TreeMenu treeMenu, String... nodePath); List<String> getNodeChildren(TreeMenu treeMenu, String... nodePath); boolean isMenuTreeVisible(TreeMenu treeMenu); boolean isDocumentNodeVisible(DocumentsMenu docMenu); int getTagCount(String tagName); }
TreeMenuNavigation extends SharePage { public HtmlPage selectTagNode(String tagName) { if (tagName == null) { throw new IllegalArgumentException("Tag name is required."); } tagName = tagName.toLowerCase(); String xpath = TreeMenu.TAGS.getXpath() + String.format(TAG_NODE, tagName); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); drone.waitForPageLoad(WAIT_TIME_3000); } catch (NoSuchElementException e) { throw new PageOperationException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone); } TreeMenuNavigation(WebDrone drone); @SuppressWarnings("unchecked") @Override TreeMenuNavigation render(RenderTime timer); @SuppressWarnings("unchecked") @Override TreeMenuNavigation render(); @SuppressWarnings("unchecked") @Override TreeMenuNavigation render(final long time); HtmlPage selectDocumentNode(DocumentsMenu docMenu); HtmlPage selectTagNode(String tagName); HtmlPage selectNode(TreeMenu treeMenu, String... nodePath); List<String> getNodeChildren(TreeMenu treeMenu, String... nodePath); boolean isMenuTreeVisible(TreeMenu treeMenu); boolean isDocumentNodeVisible(DocumentsMenu docMenu); int getTagCount(String tagName); static final String REPOSITORY_ROOT_PROPERTY; static final String DOCUMENT_LIBRARY_ROOT_PROPERTY; static final String CATEGORY_ROOT_PROPERTY; static final String SHARED_FILES_ROOT_PROPERTY; }