コード例 #1
0
  /**
   * Selects ok button
   *
   * @param drone
   * @param sourceFolder
   * @param destinationFolders
   * @param isCopy
   * @return
   */
  public static RepositoryPage copyOrMoveToFolderInRepositoryOk(
      WebDrone drone, String sourceFolder, String[] destinationFolders, boolean isCopy) {

    CopyOrMoveContentPage copyOrMoveContentPage =
        copyOrMoveToFolderInRepository(drone, sourceFolder, destinationFolders, isCopy);

    RepositoryPage repoPage = copyOrMoveContentPage.selectOkButton().render();

    return repoPage;
  }
コード例 #2
0
  /**
   * Copy folder to destination.
   *
   * @param drone
   * @param folderName
   * @param destinationFolderName
   */
  public static void copyToFolderInDestination(
      WebDrone drone, String folderName, String destinationFolderName) {

    CopyOrMoveContentPage copyOrMoveContentPage =
        ShareUserSitePage.getFileDirectoryInfo(drone, folderName).selectCopyTo().render();

    copyOrMoveContentPage = copyOrMoveContentPage.selectDestination(destinationFolderName).render();

    copyOrMoveContentPage.selectOkButton().render();
  }
コード例 #3
0
  /**
   * This method does the copy or move the folder or document into another folder. User should be on
   * RepositoryPage Page.
   *
   * @param isCopy
   * @param testFolderName
   * @param copyFolderName
   * @param docLibPage
   * @return CopyOrMoveContentPage
   */
  public static CopyOrMoveContentPage copyOrMoveToFolderInRepository(
      WebDrone drone, String sourceFolder, String[] destinationFolders, boolean isCopy) {
    if ((StringUtils.isEmpty(sourceFolder)) || (destinationFolders.length == 0)) {
      throw new IllegalArgumentException(
          "sitename/sourceFolder/destinationFolders should not be empty or null");
    }

    CopyOrMoveContentPage copyOrMoveContentPage;

    FileDirectoryInfo contentRow = ShareUserSitePage.getFileDirectoryInfo(drone, sourceFolder);
    if (isCopy) {
      copyOrMoveContentPage = contentRow.selectCopyTo().render();
    } else {
      copyOrMoveContentPage = contentRow.selectMoveTo().render();
    }
    copyOrMoveContentPage = copyOrMoveContentPage.selectDestination(REPO).render();
    copyOrMoveContentPage = copyOrMoveContentPage.selectPath(destinationFolders).render();
    return copyOrMoveContentPage;
  }