/** * Method to get Info section of Task Details page * * @return */ public TaskInfo getTaskDetailsInfo() { TaskInfo info = new TaskInfo(); try { info.setMessage( getElementText( By.xpath( "//span[@class='viewmode-label' and contains(text(), 'Message:')]/../span[@class='viewmode-value']"))); info.setOwner( getElementText( By.xpath( "//span[@class='viewmode-label' and contains(text(), 'Owner:')]/../span[@class='viewmode-value']"))); info.setPriority( getElementText( By.xpath( "//span[@class='viewmode-label' and contains(text(), 'Priority:')]/../span[@class='viewmode-value']"))); info.setDueDate( getElementText( By.xpath( "//span[@class='viewmode-label' and contains(text(), 'Due:')]/../span[@class='viewmode-value']"))); info.setDueString( getElementText( By.xpath( "//span[@class='viewmode-label' and contains(text(), 'Due:')]/../span[@class='viewmode-value']"))); info.setIdentifier( getElementText( By.xpath( "//span[@class='viewmode-label' and contains(text(), 'Identifier:')]/../span[@class='viewmode-value']"))); } catch (NoSuchElementException nse) { throw new PageOperationException("Unable to find More Info element" + nse); } return info; }