@Test(groups = "Enterprise4.2", dependsOnMethods = "getWorkFlowDetails", expectedExceptions = IllegalArgumentException.class) public void selectWorkFlowWithNullData() { myWorkFlowsPage.selectWorkFlow(null); }
public HtmlPage selectWorkFlow(String workFlowName) { if (StringUtils.isEmpty(workFlowName)) { throw new IllegalArgumentException("Workflow Name cannot be null"); } List<WebElement> workFlowRow = findWorkFlowRow(workFlowName); if (workFlowRow.size() == 0) { throw new PageException("No WorkFlows exists with name: " + workFlowName); } else if (workFlowRow.size() == 1) { workFlowRow.get(0).findElement(By.cssSelector("td.yui-dt-col-title>div.yui-dt-liner>h3>a[title='View History']")).click(); return FactorySharePage.resolvePage(drone); } else if (workFlowRow.size() > 1) { throw new PageException("More than 1 WorkFlows exists with name: " + workFlowName); } throw new PageException("Select workflow failed"); }
MyWorkFlowsPage extends SharePage { public HtmlPage selectWorkFlow(String workFlowName) { if (StringUtils.isEmpty(workFlowName)) { throw new IllegalArgumentException("Workflow Name cannot be null"); } List<WebElement> workFlowRow = findWorkFlowRow(workFlowName); if (workFlowRow.size() == 0) { throw new PageException("No WorkFlows exists with name: " + workFlowName); } else if (workFlowRow.size() == 1) { workFlowRow.get(0).findElement(By.cssSelector("td.yui-dt-col-title>div.yui-dt-liner>h3>a[title='View History']")).click(); return FactorySharePage.resolvePage(drone); } else if (workFlowRow.size() > 1) { throw new PageException("More than 1 WorkFlows exists with name: " + workFlowName); } throw new PageException("Select workflow failed"); } }
MyWorkFlowsPage extends SharePage { public HtmlPage selectWorkFlow(String workFlowName) { if (StringUtils.isEmpty(workFlowName)) { throw new IllegalArgumentException("Workflow Name cannot be null"); } List<WebElement> workFlowRow = findWorkFlowRow(workFlowName); if (workFlowRow.size() == 0) { throw new PageException("No WorkFlows exists with name: " + workFlowName); } else if (workFlowRow.size() == 1) { workFlowRow.get(0).findElement(By.cssSelector("td.yui-dt-col-title>div.yui-dt-liner>h3>a[title='View History']")).click(); return FactorySharePage.resolvePage(drone); } else if (workFlowRow.size() > 1) { throw new PageException("More than 1 WorkFlows exists with name: " + workFlowName); } throw new PageException("Select workflow failed"); } MyWorkFlowsPage(WebDrone drone); }
MyWorkFlowsPage extends SharePage { public HtmlPage selectWorkFlow(String workFlowName) { if (StringUtils.isEmpty(workFlowName)) { throw new IllegalArgumentException("Workflow Name cannot be null"); } List<WebElement> workFlowRow = findWorkFlowRow(workFlowName); if (workFlowRow.size() == 0) { throw new PageException("No WorkFlows exists with name: " + workFlowName); } else if (workFlowRow.size() == 1) { workFlowRow.get(0).findElement(By.cssSelector("td.yui-dt-col-title>div.yui-dt-liner>h3>a[title='View History']")).click(); return FactorySharePage.resolvePage(drone); } else if (workFlowRow.size() > 1) { throw new PageException("More than 1 WorkFlows exists with name: " + workFlowName); } throw new PageException("Select workflow failed"); } MyWorkFlowsPage(WebDrone drone); @SuppressWarnings("unchecked") @Override MyWorkFlowsPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override MyWorkFlowsPage render(); @SuppressWarnings("unchecked") @Override MyWorkFlowsPage render(final long time); HtmlPage selectStartWorkflowButton(); List<WorkFlowDetails> getWorkFlowDetails(String workFlowName); HtmlPage selectWorkFlow(String workFlowName); boolean isWorkFlowPresent(String workFlowName); String getSubTitle(); HtmlPage selectActiveWorkFlows(); HtmlPage selectCompletedWorkFlows(); HtmlPage cancelWorkFlow(String workFlowName); void deleteWorkFlow(String workFlowName); int getDisplayedWorkFlowCount(); WorkFlowFilters getWorkFlowsFilter(); }
MyWorkFlowsPage extends SharePage { public HtmlPage selectWorkFlow(String workFlowName) { if (StringUtils.isEmpty(workFlowName)) { throw new IllegalArgumentException("Workflow Name cannot be null"); } List<WebElement> workFlowRow = findWorkFlowRow(workFlowName); if (workFlowRow.size() == 0) { throw new PageException("No WorkFlows exists with name: " + workFlowName); } else if (workFlowRow.size() == 1) { workFlowRow.get(0).findElement(By.cssSelector("td.yui-dt-col-title>div.yui-dt-liner>h3>a[title='View History']")).click(); return FactorySharePage.resolvePage(drone); } else if (workFlowRow.size() > 1) { throw new PageException("More than 1 WorkFlows exists with name: " + workFlowName); } throw new PageException("Select workflow failed"); } MyWorkFlowsPage(WebDrone drone); @SuppressWarnings("unchecked") @Override MyWorkFlowsPage render(RenderTime timer); @SuppressWarnings("unchecked") @Override MyWorkFlowsPage render(); @SuppressWarnings("unchecked") @Override MyWorkFlowsPage render(final long time); HtmlPage selectStartWorkflowButton(); List<WorkFlowDetails> getWorkFlowDetails(String workFlowName); HtmlPage selectWorkFlow(String workFlowName); boolean isWorkFlowPresent(String workFlowName); String getSubTitle(); HtmlPage selectActiveWorkFlows(); HtmlPage selectCompletedWorkFlows(); HtmlPage cancelWorkFlow(String workFlowName); void deleteWorkFlow(String workFlowName); int getDisplayedWorkFlowCount(); WorkFlowFilters getWorkFlowsFilter();  }