@Test(groups = "Hybrid") public void prepareCloudSyncData() throws Exception { MyProfilePage myProfilePage = ((SharePage) drone.getCurrentPage()).getNav().selectMyProfile().render(); CloudSyncPage cloudSyncPage = myProfilePage.getProfileNav().selectCloudSyncPage().render(); CloudSignInPage cloudSignInPage = cloudSyncPage.selectCloudSign().render(); cloudSignInPage.loginAs(cloudUserName, cloudUserPassword).render(); SiteUtil.createSite(drone, siteName, "Public"); SitePage site = drone.getCurrentPage().render(); documentLibPage = site.getSiteNav().selectSiteDocumentLibrary().render(); UploadFilePage uploadForm = documentLibPage.getNavigation().selectFileUpload().render(); documentLibPage = uploadForm.uploadFile(file.getCanonicalPath()).render(); drone.refresh(); desAndAsgPage = (DestinationAndAssigneePage)documentLibPage.getFileDirectoryInfo(file.getName()).selectSyncToCloud().render(); documentLibPage = ((DocumentLibraryPage)desAndAsgPage.selectSubmitButtonToSync()).render(); documentLibPage.render().getNavigation().selectCreateNewFolder().render().createNewFolder(folder); drone.refresh(); documentLibPage.render().getNavigation().selectCreateNewFolder().render().createNewFolder(folder2); drone.refresh(); desAndAsgPage = (DestinationAndAssigneePage)documentLibPage.getFileDirectoryInfo(folder).selectSyncToCloud().render(); documentLibPage = ((DocumentLibraryPage)desAndAsgPage.selectSubmitButtonToSync()).render(); documentLibPage = documentLibPage.renderItem(maxWaitTime_CloudSync , folder2); desAndAsgPage = documentLibPage.getFileDirectoryInfo(folder2).selectSyncToCloud().render(); documentLibPage = ((DocumentLibraryPage)desAndAsgPage.selectSubmitButtonToSync()).render(); documentLibPage = documentLibPage.renderItem(maxWaitTime_CloudSync, folder2); }
@SuppressWarnings("unchecked") public SyncInfoPage render(RenderTime timer) { renderLoop: while (true) { timer.start(); try { List<WebElement> statusElements = drone.findAll(STATUS_HEADING); for (WebElement status : statusElements) { if (status.isDisplayed()) { break renderLoop; } } } catch (NoSuchElementException nse) { } finally { timer.end(); } } return this; }
SyncInfoPage extends SharePage { @SuppressWarnings("unchecked") public SyncInfoPage render(RenderTime timer) { renderLoop: while (true) { timer.start(); try { List<WebElement> statusElements = drone.findAll(STATUS_HEADING); for (WebElement status : statusElements) { if (status.isDisplayed()) { break renderLoop; } } } catch (NoSuchElementException nse) { } finally { timer.end(); } } return this; } }
SyncInfoPage extends SharePage { @SuppressWarnings("unchecked") public SyncInfoPage render(RenderTime timer) { renderLoop: while (true) { timer.start(); try { List<WebElement> statusElements = drone.findAll(STATUS_HEADING); for (WebElement status : statusElements) { if (status.isDisplayed()) { break renderLoop; } } } catch (NoSuchElementException nse) { } finally { timer.end(); } } return this; } SyncInfoPage(WebDrone drone); }
SyncInfoPage extends SharePage { @SuppressWarnings("unchecked") public SyncInfoPage render(RenderTime timer) { renderLoop: while (true) { timer.start(); try { List<WebElement> statusElements = drone.findAll(STATUS_HEADING); for (WebElement status : statusElements) { if (status.isDisplayed()) { break renderLoop; } } } catch (NoSuchElementException nse) { } finally { timer.end(); } } return this; } SyncInfoPage(WebDrone drone); @SuppressWarnings("unchecked") SyncInfoPage render(RenderTime timer); @SuppressWarnings("unchecked") SyncInfoPage render(long time); @SuppressWarnings("unchecked") SyncInfoPage render(); boolean isCloseButtonPresent(); boolean isSyncStatusPresent(); boolean isSyncLocationPresent(); boolean isRequestSyncButtonPresent(); boolean isUnsyncButtonPresent(); HtmlPage clickOnCloseButton(); String getCloudSyncStatus(); String getCloudSyncLocation(); String getCloudSyncDocumentName(); Date getSyncPeriodDetails(); void selectUnsyncRemoveContentFromCloud(boolean removeContentFromCloud); boolean isUnSyncIconPresentInDetailsPage(); }
SyncInfoPage extends SharePage { @SuppressWarnings("unchecked") public SyncInfoPage render(RenderTime timer) { renderLoop: while (true) { timer.start(); try { List<WebElement> statusElements = drone.findAll(STATUS_HEADING); for (WebElement status : statusElements) { if (status.isDisplayed()) { break renderLoop; } } } catch (NoSuchElementException nse) { } finally { timer.end(); } } return this; } SyncInfoPage(WebDrone drone); @SuppressWarnings("unchecked") SyncInfoPage render(RenderTime timer); @SuppressWarnings("unchecked") SyncInfoPage render(long time); @SuppressWarnings("unchecked") SyncInfoPage render(); boolean isCloseButtonPresent(); boolean isSyncStatusPresent(); boolean isSyncLocationPresent(); boolean isRequestSyncButtonPresent(); boolean isUnsyncButtonPresent(); HtmlPage clickOnCloseButton(); String getCloudSyncStatus(); String getCloudSyncLocation(); String getCloudSyncDocumentName(); Date getSyncPeriodDetails(); void selectUnsyncRemoveContentFromCloud(boolean removeContentFromCloud); boolean isUnSyncIconPresentInDetailsPage(); static final By PROMPT_BUTTONS; static final By REMOVE_CHECKBOX; static final By STATUS_HEADING; }