@Test(groups = "Enterprise4.2", dependsOnMethods = "selectStatusDropDownTest") public void selectItem() { pageUnderTest.selectItem(fileName, itemSiteName); pageUnderTest = drone.getCurrentPage().render(); assertTrue(pageUnderTest.getTaskItems().get(0).getItemName().equals(fileName), "The expected item isn't added"); }
public void selectItem(String fileName, String siteName) { if (StringUtils.isEmpty(fileName)) { throw new IllegalArgumentException("File Name cannot be Empty"); } if (StringUtils.isEmpty(siteName)) { throw new IllegalArgumentException("Site Name cannot be Empty"); } SelectContentPage selectContentPage = clickAddItems().render(); selectContentPage.addItemFromSite(fileName, siteName); selectContentPage.selectOKButton().render(); }
EditTaskPage extends SharePage { public void selectItem(String fileName, String siteName) { if (StringUtils.isEmpty(fileName)) { throw new IllegalArgumentException("File Name cannot be Empty"); } if (StringUtils.isEmpty(siteName)) { throw new IllegalArgumentException("Site Name cannot be Empty"); } SelectContentPage selectContentPage = clickAddItems().render(); selectContentPage.addItemFromSite(fileName, siteName); selectContentPage.selectOKButton().render(); } }
EditTaskPage extends SharePage { public void selectItem(String fileName, String siteName) { if (StringUtils.isEmpty(fileName)) { throw new IllegalArgumentException("File Name cannot be Empty"); } if (StringUtils.isEmpty(siteName)) { throw new IllegalArgumentException("Site Name cannot be Empty"); } SelectContentPage selectContentPage = clickAddItems().render(); selectContentPage.addItemFromSite(fileName, siteName); selectContentPage.selectOKButton().render(); } EditTaskPage(WebDrone drone); }
EditTaskPage extends SharePage { public void selectItem(String fileName, String siteName) { if (StringUtils.isEmpty(fileName)) { throw new IllegalArgumentException("File Name cannot be Empty"); } if (StringUtils.isEmpty(siteName)) { throw new IllegalArgumentException("Site Name cannot be Empty"); } SelectContentPage selectContentPage = clickAddItems().render(); selectContentPage.addItemFromSite(fileName, siteName); selectContentPage.selectOKButton().render(); } 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 void selectItem(String fileName, String siteName) { if (StringUtils.isEmpty(fileName)) { throw new IllegalArgumentException("File Name cannot be Empty"); } if (StringUtils.isEmpty(siteName)) { throw new IllegalArgumentException("Site Name cannot be Empty"); } SelectContentPage selectContentPage = clickAddItems().render(); selectContentPage.addItemFromSite(fileName, siteName); selectContentPage.selectOKButton().render(); } 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();  }