Пример #1
0
 /**
  * Method to create new Wiki Page. User must be logged in to the Share.
  *
  * @param driver - WebDrone Instance
  * @param siteName
  * @param wikiTitle
  * @param text
  * @param tag
  * @return WikiPage
  */
 public static WikiPage createWikiPage(
     WebDrone driver, String siteName, String wikiTitle, String text, String tag) {
   SiteDashboardPage siteDashboardPage = ShareUser.openSiteDashboard(driver, siteName).render();
   WikiPage wikiPage = siteDashboardPage.getSiteNav().selectSiteWikiPage().render();
   List<String> wikiText = new ArrayList<>();
   wikiText.add(text);
   List<String> wikiTag = new ArrayList<>();
   wikiTag.add(tag);
   return wikiPage.createWikiPage(wikiTitle, wikiText, wikiTag).render();
 }
Пример #2
0
  /**
   * Method to get LinkId
   *
   * @param drone
   * @param siteName
   * @param linkTitle
   * @return String
   */
  public static String getLinkId(WebDrone drone, String siteName, String linkTitle) {
    try {

      SiteDashboardPage site = ShareUser.openSiteDashboard(drone, siteName).render();
      LinksPage linksPage = site.getSiteNav().selectLinksPage();
      linksPage.clickLink(linkTitle);
      WebElement element = drone.findAndWait(By.xpath(LINK_TITLE_PREVIEW));
      String linkId = element.getAttribute("href").split("[?=]+")[2];
      return linkId;
    } catch (NoSuchElementException ex) {
      throw new NoSuchElementException("Element not found", ex);
    }
  }
  @Test(
      groups = {"Enterprise4.2"},
      priority = 24)
  public void test124SelectStartWorkFlow() throws Exception {
    // Select SyncToCloud
    FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName());
    StartWorkFlowPage startWorkFlowPage = thisRow.selectStartWorkFlow().render();
    Assert.assertTrue(startWorkFlowPage.getTitle().contains("Start Workflow"));

    SiteFinderPage siteFinder = startWorkFlowPage.getNav().selectSearchForSites().render();
    siteFinder = siteFinder.searchForSite(siteName).render();
    SiteDashboardPage siteDash = siteFinder.selectSite(siteName).render();
    documentLibPage = siteDash.getSiteNav().selectDocumentLibrary().render();
    Assert.assertNotNull(documentLibPage);
  }