@Test(groups = "Enterprise-only", dependsOnMethods = "addLinksPage") public void createLink() { assertTrue(linksPage.isCreateLinkEnabled()); linksDetailsPage = linksPage.createLink(text, url).render(); assertEquals(linksDetailsPage.getLinkTitle(), text); assertNotNull(linksDetailsPage); }
public LinksDetailsPage createLink(String name, String url) { try { drone.findAndWait(NEW_LINK_BTN).click(); AddLinkForm addLinkForm = new AddLinkForm(drone); addLinkForm.setTitleField(name); addLinkForm.setUrlField(url); addLinkForm.clickSaveBtn(); waitUntilAlert(); return new LinksDetailsPage(drone).render(); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find element"); } }
LinksPage extends SharePage { public LinksDetailsPage createLink(String name, String url) { try { drone.findAndWait(NEW_LINK_BTN).click(); AddLinkForm addLinkForm = new AddLinkForm(drone); addLinkForm.setTitleField(name); addLinkForm.setUrlField(url); addLinkForm.clickSaveBtn(); waitUntilAlert(); return new LinksDetailsPage(drone).render(); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find element"); } } }
LinksPage extends SharePage { public LinksDetailsPage createLink(String name, String url) { try { drone.findAndWait(NEW_LINK_BTN).click(); AddLinkForm addLinkForm = new AddLinkForm(drone); addLinkForm.setTitleField(name); addLinkForm.setUrlField(url); addLinkForm.clickSaveBtn(); waitUntilAlert(); return new LinksDetailsPage(drone).render(); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find element"); } } LinksPage(WebDrone drone); }
LinksPage extends SharePage { public LinksDetailsPage createLink(String name, String url) { try { drone.findAndWait(NEW_LINK_BTN).click(); AddLinkForm addLinkForm = new AddLinkForm(drone); addLinkForm.setTitleField(name); addLinkForm.setUrlField(url); addLinkForm.clickSaveBtn(); waitUntilAlert(); return new LinksDetailsPage(drone).render(); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find element"); } } LinksPage(WebDrone drone); @SuppressWarnings("unchecked") @Override LinksPage render(RenderTime timer); @SuppressWarnings("unchecked") LinksPage render(); @SuppressWarnings("unchecked") @Override LinksPage render(long time); AddLinkForm clickNewLink(); LinksDetailsPage createLink(String name, String url); LinksDetailsPage createLink(String name, String url, String tagName); LinksDetailsPage createLink(String name, String url, String description, String tagName); boolean isCreateLinkEnabled(); LinkDirectoryInfo getLinkDirectoryInfo(final String title); LinksDetailsPage editLink(String linkTitle, String linkNewTitle, String url, String desc, boolean internalChkBox); LinksPage deleteLinkWithConfirm(String title); int getLinksCount(); boolean isEditLinkDisplayed(String linkName); boolean isDeleteLinkDisplayed(String linkName); LinksDetailsPage clickLink(String linkTitle); RssFeedPage selectRssFeed(String username, String password); LinksListFilter getLinkListFilter(); void selectAction(CheckBoxAction checkBoxAction); void selectedItemsAction(SelectedAction selectedAction); boolean isLinkPresented(String title); boolean checkTags(String title, String tag); boolean isNoLinksDisplayed(); }
LinksPage extends SharePage { public LinksDetailsPage createLink(String name, String url) { try { drone.findAndWait(NEW_LINK_BTN).click(); AddLinkForm addLinkForm = new AddLinkForm(drone); addLinkForm.setTitleField(name); addLinkForm.setUrlField(url); addLinkForm.clickSaveBtn(); waitUntilAlert(); return new LinksDetailsPage(drone).render(); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find element"); } } LinksPage(WebDrone drone); @SuppressWarnings("unchecked") @Override LinksPage render(RenderTime timer); @SuppressWarnings("unchecked") LinksPage render(); @SuppressWarnings("unchecked") @Override LinksPage render(long time); AddLinkForm clickNewLink(); LinksDetailsPage createLink(String name, String url); LinksDetailsPage createLink(String name, String url, String tagName); LinksDetailsPage createLink(String name, String url, String description, String tagName); boolean isCreateLinkEnabled(); LinkDirectoryInfo getLinkDirectoryInfo(final String title); LinksDetailsPage editLink(String linkTitle, String linkNewTitle, String url, String desc, boolean internalChkBox); LinksPage deleteLinkWithConfirm(String title); int getLinksCount(); boolean isEditLinkDisplayed(String linkName); boolean isDeleteLinkDisplayed(String linkName); LinksDetailsPage clickLink(String linkTitle); RssFeedPage selectRssFeed(String username, String password); LinksListFilter getLinkListFilter(); void selectAction(CheckBoxAction checkBoxAction); void selectedItemsAction(SelectedAction selectedAction); boolean isLinkPresented(String title); boolean checkTags(String title, String tag); boolean isNoLinksDisplayed();  }