@Test(groups = "Enterprise4.2", dependsOnMethods = "selectReassign") public void selectTaskDoneButtonTest() { pageUnderTest.enterComment("Task Completed"); returnedPage = pageUnderTest.selectTaskDoneButton().render(); assertTrue(returnedPage instanceof MyTasksPage, "The return page should be an instance of MyTasksPage page"); }
public HtmlPage selectTaskDoneButton() { WebElement taskDoneButton = drone.findAndWait(TASK_DONE.by); String id = taskDoneButton.getAttribute("id"); taskDoneButton.click(); drone.waitUntilElementDeletedFromDom(By.id(id), TimeUnit.SECONDS.convert(maxPageLoadingTime, TimeUnit.MILLISECONDS)); return FactorySharePage.resolvePage(drone); }
EditTaskPage extends SharePage { public HtmlPage selectTaskDoneButton() { WebElement taskDoneButton = drone.findAndWait(TASK_DONE.by); String id = taskDoneButton.getAttribute("id"); taskDoneButton.click(); drone.waitUntilElementDeletedFromDom(By.id(id), TimeUnit.SECONDS.convert(maxPageLoadingTime, TimeUnit.MILLISECONDS)); return FactorySharePage.resolvePage(drone); } }
EditTaskPage extends SharePage { public HtmlPage selectTaskDoneButton() { WebElement taskDoneButton = drone.findAndWait(TASK_DONE.by); String id = taskDoneButton.getAttribute("id"); taskDoneButton.click(); drone.waitUntilElementDeletedFromDom(By.id(id), TimeUnit.SECONDS.convert(maxPageLoadingTime, TimeUnit.MILLISECONDS)); return FactorySharePage.resolvePage(drone); } EditTaskPage(WebDrone drone); }
EditTaskPage extends SharePage { public HtmlPage selectTaskDoneButton() { WebElement taskDoneButton = drone.findAndWait(TASK_DONE.by); String id = taskDoneButton.getAttribute("id"); taskDoneButton.click(); drone.waitUntilElementDeletedFromDom(By.id(id), TimeUnit.SECONDS.convert(maxPageLoadingTime, TimeUnit.MILLISECONDS)); return FactorySharePage.resolvePage(drone); } EditTaskPage(WebDrone drone); @SuppressWarnings("unchecked") @Override EditTaskPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override EditTaskPage render(); @SuppressWarnings("unchecked") @Override EditTaskPage render(final long time); HtmlPage selectStatusDropDown(TaskStatus status); TaskStatus getSelectedStatusFromDropDown(); HtmlPage selectTaskDoneButton(); HtmlPage selectRejectButton(); HtmlPage selectApproveButton(); HtmlPage selectSaveButton(); void enterComment(String comment); TaskInfo getTaskDetailsInfo(); List<TaskItem> getTaskItems(); List<TaskItem> getTaskItem(String fileName); List<TaskStatus> getStatusOptions(); HtmlPage selectCancelButton(); boolean isReAssignButtonDisplayed(); HtmlPage selectAcceptButton(); boolean isButtonsDisplayed(Button button); void selectItem(String fileName, String siteName); SelectContentPage clickAddItems(); ReassignPage clickReassign(); MyTasksPage selectReassign(String userName); EditTaskPage selectClaim(); boolean isCommentTextAreaDisplayed(); String readCommentFromCommentTextArea(); }
EditTaskPage extends SharePage { public HtmlPage selectTaskDoneButton() { WebElement taskDoneButton = drone.findAndWait(TASK_DONE.by); String id = taskDoneButton.getAttribute("id"); taskDoneButton.click(); drone.waitUntilElementDeletedFromDom(By.id(id), TimeUnit.SECONDS.convert(maxPageLoadingTime, TimeUnit.MILLISECONDS)); return FactorySharePage.resolvePage(drone); } EditTaskPage(WebDrone drone); @SuppressWarnings("unchecked") @Override EditTaskPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override EditTaskPage render(); @SuppressWarnings("unchecked") @Override EditTaskPage render(final long time); HtmlPage selectStatusDropDown(TaskStatus status); TaskStatus getSelectedStatusFromDropDown(); HtmlPage selectTaskDoneButton(); HtmlPage selectRejectButton(); HtmlPage selectApproveButton(); HtmlPage selectSaveButton(); void enterComment(String comment); TaskInfo getTaskDetailsInfo(); List<TaskItem> getTaskItems(); List<TaskItem> getTaskItem(String fileName); List<TaskStatus> getStatusOptions(); HtmlPage selectCancelButton(); boolean isReAssignButtonDisplayed(); HtmlPage selectAcceptButton(); boolean isButtonsDisplayed(Button button); void selectItem(String fileName, String siteName); SelectContentPage clickAddItems(); ReassignPage clickReassign(); MyTasksPage selectReassign(String userName); EditTaskPage selectClaim(); boolean isCommentTextAreaDisplayed(); String readCommentFromCommentTextArea();  }