@Test(dependsOnMethods = "isDocumentNodeVisible", groups = "alfresco-one") public void selectDocumentNode() throws Exception { TreeMenuNavigation treeMenuNav = documentLibPage.getLeftMenus(); int retry = 5; do { documentLibPage = treeMenuNav.selectDocumentNode(DocumentsMenu.MY_FAVORITES).render(); try { documentLibPage.renderItem(3000, file1.getName()); break; } catch (PageRenderTimeException error) { } retry--; } while(retry > 0); assertTrue(documentLibPage.getFiles().size() == 1, "JIRA - ACE-1860"); assertEquals(documentLibPage.getFiles().get(0).getName(), file1.getName()); }
public HtmlPage selectDocumentNode(DocumentsMenu docMenu) { if (docMenu == null) { throw new IllegalArgumentException("DocumentsMenu is required."); } String xpath = TreeMenu.DOCUMENTS.getXpath() + docMenu.getXpath(); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); } catch (NoSuchElementException e) { throw new PageException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone).render(); }
TreeMenuNavigation extends SharePage { public HtmlPage selectDocumentNode(DocumentsMenu docMenu) { if (docMenu == null) { throw new IllegalArgumentException("DocumentsMenu is required."); } String xpath = TreeMenu.DOCUMENTS.getXpath() + docMenu.getXpath(); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); } catch (NoSuchElementException e) { throw new PageException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone).render(); } }
TreeMenuNavigation extends SharePage { public HtmlPage selectDocumentNode(DocumentsMenu docMenu) { if (docMenu == null) { throw new IllegalArgumentException("DocumentsMenu is required."); } String xpath = TreeMenu.DOCUMENTS.getXpath() + docMenu.getXpath(); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); } catch (NoSuchElementException e) { throw new PageException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone).render(); } TreeMenuNavigation(WebDrone drone); }
TreeMenuNavigation extends SharePage { public HtmlPage selectDocumentNode(DocumentsMenu docMenu) { if (docMenu == null) { throw new IllegalArgumentException("DocumentsMenu is required."); } String xpath = TreeMenu.DOCUMENTS.getXpath() + docMenu.getXpath(); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); } catch (NoSuchElementException e) { throw new PageException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone).render(); } 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 selectDocumentNode(DocumentsMenu docMenu) { if (docMenu == null) { throw new IllegalArgumentException("DocumentsMenu is required."); } String xpath = TreeMenu.DOCUMENTS.getXpath() + docMenu.getXpath(); By nodeLocator = By.xpath(xpath); try { expandMenu(TreeMenu.DOCUMENTS); drone.find(nodeLocator).click(); } catch (NoSuchElementException e) { throw new PageException("Unable to find element " + nodeLocator, e); } return FactorySharePage.resolvePage(drone).render(); } 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; }