@Test(dependsOnMethods = "editOffline") public void getDocumentBody() throws Exception { DocumentLibraryPage libraryPage = drone.getCurrentPage().render(); CreatePlainTextContentPage contentPage = libraryPage.getNavigation().selectCreateContent(ContentType.PLAINTEXT).render(); ContentDetails contentDetails = new ContentDetails(); contentDetails.setName("Test Doc"); contentDetails.setTitle("Test"); contentDetails.setDescription("Desc"); String content = "Content Test Doc"; contentDetails.setContent(content); DocumentDetailsPage detailsPage = contentPage.create(contentDetails).render(); assertEquals(detailsPage.getDocumentBody(), content); }
public String getDocumentBody() { try { drone.waitForElement(DOCUMENT_BODY, 30); return drone.find(DOCUMENT_BODY).getText(); } catch (TimeoutException e) { throw new PageOperationException("Not able to find the document body. " + e); } }
DocumentDetailsPage extends DetailsPage { public String getDocumentBody() { try { drone.waitForElement(DOCUMENT_BODY, 30); return drone.find(DOCUMENT_BODY).getText(); } catch (TimeoutException e) { throw new PageOperationException("Not able to find the document body. " + e); } } }
DocumentDetailsPage extends DetailsPage { public String getDocumentBody() { try { drone.waitForElement(DOCUMENT_BODY, 30); return drone.find(DOCUMENT_BODY).getText(); } catch (TimeoutException e) { throw new PageOperationException("Not able to find the document body. " + e); } } DocumentDetailsPage(WebDrone drone);  DocumentDetailsPage(WebDrone drone, final String previousVersion); }
DocumentDetailsPage extends DetailsPage { public String getDocumentBody() { try { drone.waitForElement(DOCUMENT_BODY, 30); return drone.find(DOCUMENT_BODY).getText(); } catch (TimeoutException e) { throw new PageOperationException("Not able to find the document body. " + e); } } DocumentDetailsPage(WebDrone drone);  DocumentDetailsPage(WebDrone drone, final String previousVersion); synchronized void setPreviousVersion(final String previousVersion); @SuppressWarnings("unchecked") @Override synchronized DocumentDetailsPage render(RenderTime timer); synchronized String getDocumentVersion(); boolean isUploadNewVersionDisplayed(); boolean isEditOfflineLinkDisplayed(); boolean isEditOfflineDisplayed(); boolean isLockedByYou(); @SuppressWarnings("unchecked") @Override DocumentDetailsPage render(); @SuppressWarnings("unchecked") @Override DocumentDetailsPage render(final long time); boolean isDocumentDetailsPage(); DocumentLibraryPage delete(); String getDocumentTitle(); HtmlPage selectUploadNewVersion(); HtmlPage getFileUpdatePage(WebDrone drone, final String version, final boolean editOffLine); WebElement getRevisionPanel(); String getCommentsOfLastCommit(); synchronized boolean isCheckedOut(); synchronized String getContentInfo(); HtmlPage selectEditOffLine(File file); EditTextDocumentPage selectInlineEdit(); HtmlPage selectDownload(File file); String getDocumentSize(); boolean isFlashPreviewDisplayed(); String getPreviewerClassName(); boolean isNoPreviewMessageDisplayed(); PdfJsPlugin getPdfJsPreview(); DocumentDetailsPage clickOnDownloadLinkForUnsupportedDocument(); HtmlPage selectSyncToCloud(); HtmlPage selectSyncToCloud(boolean isCloudSyncSetUp); boolean isSignUpDialogVisible(); boolean isDestAndAssigneeVisible(); DocumentDetailsPage selectUnSyncFromCloud(); boolean isFileSyncSetUp(); StartWorkFlowPage selectStartWorkFlowPage(); HtmlPage selectStartWorkFlowIcon(); boolean isSyncToCloudOptionDisplayed(); HtmlPage editInGoogleDocs(); HtmlPage editInGoogleDocsOldFormat(boolean confirmUpgrade); HtmlPage resumeEditInGoogleDocs(); boolean isEditInGoogleDocsLinkVisible(); boolean isResumeEditingInGoogleDocsLinkVisible(); boolean isInlineEditLinkDisplayed(); boolean isCommentCountPresent(long waitTime); boolean isHideRecordLinkDisplayed(); String getSyncStatus(); String getLocationInCloud(); boolean isRequestSyncIconDisplayed(); HtmlPage selectRevertToVersion(String versionNumber); boolean isPartOfWorkflow(); DocumentDetailsPage openCopyThisLinkInNewTab(); String getExpectedVersion(); synchronized void setExpectedVersion(String expectedVersion); ChangeTypePage selectChangeType(); void selectDownloadPreviousVersion(String versionNumber); HtmlPage clickShareLink(); boolean isFileShared(); List<WebElement> getEditControls(); boolean isViewOnGoogleMapsLinkVisible(); boolean isDownloadButtonVisible(); EditTextDocumentPage selectOnlineEdit(); HtmlPage selectDownloadFromActions(File file); boolean isViewWorkingCopyDisplayed(); List<String> getDocumentActionList(); boolean isVersionHistoryPanelPresent(); boolean isVersionPresentInVersionHistoryPanel(String version); boolean isStartWorkflowIconDisplayed(); boolean isUploadNewVersionIconDisplayed(); StartWorkFlowPage clickStartWorkflowIcon(); HtmlPage selectUploadNewVersionIcon(); HtmlPage selectViewProperties(String versionNumber); HtmlPage selectInlineHtmlEdit(); VersionDetails getCurrentVersionDetails(); List<VersionDetails> getOlderVersionDetails(); HtmlPage cancelNo(); void clickYes(); String getDocumentBody(); String getErrorEditOfflineDocument(); }
DocumentDetailsPage extends DetailsPage { public String getDocumentBody() { try { drone.waitForElement(DOCUMENT_BODY, 30); return drone.find(DOCUMENT_BODY).getText(); } catch (TimeoutException e) { throw new PageOperationException("Not able to find the document body. " + e); } } DocumentDetailsPage(WebDrone drone);  DocumentDetailsPage(WebDrone drone, final String previousVersion); synchronized void setPreviousVersion(final String previousVersion); @SuppressWarnings("unchecked") @Override synchronized DocumentDetailsPage render(RenderTime timer); synchronized String getDocumentVersion(); boolean isUploadNewVersionDisplayed(); boolean isEditOfflineLinkDisplayed(); boolean isEditOfflineDisplayed(); boolean isLockedByYou(); @SuppressWarnings("unchecked") @Override DocumentDetailsPage render(); @SuppressWarnings("unchecked") @Override DocumentDetailsPage render(final long time); boolean isDocumentDetailsPage(); DocumentLibraryPage delete(); String getDocumentTitle(); HtmlPage selectUploadNewVersion(); HtmlPage getFileUpdatePage(WebDrone drone, final String version, final boolean editOffLine); WebElement getRevisionPanel(); String getCommentsOfLastCommit(); synchronized boolean isCheckedOut(); synchronized String getContentInfo(); HtmlPage selectEditOffLine(File file); EditTextDocumentPage selectInlineEdit(); HtmlPage selectDownload(File file); String getDocumentSize(); boolean isFlashPreviewDisplayed(); String getPreviewerClassName(); boolean isNoPreviewMessageDisplayed(); PdfJsPlugin getPdfJsPreview(); DocumentDetailsPage clickOnDownloadLinkForUnsupportedDocument(); HtmlPage selectSyncToCloud(); HtmlPage selectSyncToCloud(boolean isCloudSyncSetUp); boolean isSignUpDialogVisible(); boolean isDestAndAssigneeVisible(); DocumentDetailsPage selectUnSyncFromCloud(); boolean isFileSyncSetUp(); StartWorkFlowPage selectStartWorkFlowPage(); HtmlPage selectStartWorkFlowIcon(); boolean isSyncToCloudOptionDisplayed(); HtmlPage editInGoogleDocs(); HtmlPage editInGoogleDocsOldFormat(boolean confirmUpgrade); HtmlPage resumeEditInGoogleDocs(); boolean isEditInGoogleDocsLinkVisible(); boolean isResumeEditingInGoogleDocsLinkVisible(); boolean isInlineEditLinkDisplayed(); boolean isCommentCountPresent(long waitTime); boolean isHideRecordLinkDisplayed(); String getSyncStatus(); String getLocationInCloud(); boolean isRequestSyncIconDisplayed(); HtmlPage selectRevertToVersion(String versionNumber); boolean isPartOfWorkflow(); DocumentDetailsPage openCopyThisLinkInNewTab(); String getExpectedVersion(); synchronized void setExpectedVersion(String expectedVersion); ChangeTypePage selectChangeType(); void selectDownloadPreviousVersion(String versionNumber); HtmlPage clickShareLink(); boolean isFileShared(); List<WebElement> getEditControls(); boolean isViewOnGoogleMapsLinkVisible(); boolean isDownloadButtonVisible(); EditTextDocumentPage selectOnlineEdit(); HtmlPage selectDownloadFromActions(File file); boolean isViewWorkingCopyDisplayed(); List<String> getDocumentActionList(); boolean isVersionHistoryPanelPresent(); boolean isVersionPresentInVersionHistoryPanel(String version); boolean isStartWorkflowIconDisplayed(); boolean isUploadNewVersionIconDisplayed(); StartWorkFlowPage clickStartWorkflowIcon(); HtmlPage selectUploadNewVersionIcon(); HtmlPage selectViewProperties(String versionNumber); HtmlPage selectInlineHtmlEdit(); VersionDetails getCurrentVersionDetails(); List<VersionDetails> getOlderVersionDetails(); HtmlPage cancelNo(); void clickYes(); String getDocumentBody(); String getErrorEditOfflineDocument(); static final String DOCUMENT_VERSION_PLACEHOLDER; }