@Test(dependsOnMethods = "blogTreeMenuNavigation") public void saveAsDraft() { assertTrue(blogPage.isNewPostEnabled()); postViewPage = blogPage.saveAsDraft(text + "draft", text, null).render(); assertNotNull(postViewPage); assertTrue(postViewPage.verifyPostExists(text + "draft")); }
public PostViewPage saveAsDraft(String titleField, String txtLines) { try { BlogPage blogPage = new BlogPage(drone); NewPostForm newPostForm = blogPage.clickNewPost(); newPostForm.setTitleField(titleField); newPostForm.insertText(txtLines); return newPostForm.clickSaveAsDraft().render(3000); } catch (TimeoutException te) { throw new ShareException("the operation has timed out"); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find the button"); } }
BlogPage extends SitePage { public PostViewPage saveAsDraft(String titleField, String txtLines) { try { BlogPage blogPage = new BlogPage(drone); NewPostForm newPostForm = blogPage.clickNewPost(); newPostForm.setTitleField(titleField); newPostForm.insertText(txtLines); return newPostForm.clickSaveAsDraft().render(3000); } catch (TimeoutException te) { throw new ShareException("the operation has timed out"); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find the button"); } } }
BlogPage extends SitePage { public PostViewPage saveAsDraft(String titleField, String txtLines) { try { BlogPage blogPage = new BlogPage(drone); NewPostForm newPostForm = blogPage.clickNewPost(); newPostForm.setTitleField(titleField); newPostForm.insertText(txtLines); return newPostForm.clickSaveAsDraft().render(3000); } catch (TimeoutException te) { throw new ShareException("the operation has timed out"); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find the button"); } } BlogPage(WebDrone drone); }
BlogPage extends SitePage { public PostViewPage saveAsDraft(String titleField, String txtLines) { try { BlogPage blogPage = new BlogPage(drone); NewPostForm newPostForm = blogPage.clickNewPost(); newPostForm.setTitleField(titleField); newPostForm.insertText(txtLines); return newPostForm.clickSaveAsDraft().render(3000); } catch (TimeoutException te) { throw new ShareException("the operation has timed out"); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find the button"); } } BlogPage(WebDrone drone); @SuppressWarnings("unchecked") @Override BlogPage render(RenderTime timer); @SuppressWarnings("unchecked") BlogPage render(); @SuppressWarnings("unchecked") @Override BlogPage render(long time); PostViewPage createPostInternally(String titleField); PostViewPage createPostInternally(String titleField, String txtLines); PostViewPage createPostInternally(String titleField, String txtLines, String tagName); PostViewPage createPostInternally(String titleField, String txtLines, List<String> tags); PostViewPage saveAsDraft(String titleField, String txtLines); boolean isNewPostEnabled(); PostViewPage openBlogPost(String title); int getPostsCount(); boolean isPostPresented(String postName); PostViewPage saveAsDraft(String titleField, String txtLines, List<String> tagName); RssFeedPage clickRssFeedBtn(String username, String password); boolean checkTags(String title, String tag); PostViewPage editPost(String oldTitle, String newTitle, String txtLines, String tagName, boolean removeTag); PostDirectoryInfo getPostDirectoryInfo(final String title); BlogTreeMenuNavigation getLeftMenus(); }
BlogPage extends SitePage { public PostViewPage saveAsDraft(String titleField, String txtLines) { try { BlogPage blogPage = new BlogPage(drone); NewPostForm newPostForm = blogPage.clickNewPost(); newPostForm.setTitleField(titleField); newPostForm.insertText(txtLines); return newPostForm.clickSaveAsDraft().render(3000); } catch (TimeoutException te) { throw new ShareException("the operation has timed out"); } catch (NoSuchElementException nse) { throw new ShareException("Unable to find the button"); } } BlogPage(WebDrone drone); @SuppressWarnings("unchecked") @Override BlogPage render(RenderTime timer); @SuppressWarnings("unchecked") BlogPage render(); @SuppressWarnings("unchecked") @Override BlogPage render(long time); PostViewPage createPostInternally(String titleField); PostViewPage createPostInternally(String titleField, String txtLines); PostViewPage createPostInternally(String titleField, String txtLines, String tagName); PostViewPage createPostInternally(String titleField, String txtLines, List<String> tags); PostViewPage saveAsDraft(String titleField, String txtLines); boolean isNewPostEnabled(); PostViewPage openBlogPost(String title); int getPostsCount(); boolean isPostPresented(String postName); PostViewPage saveAsDraft(String titleField, String txtLines, List<String> tagName); RssFeedPage clickRssFeedBtn(String username, String password); boolean checkTags(String title, String tag); PostViewPage editPost(String oldTitle, String newTitle, String txtLines, String tagName, boolean removeTag); PostDirectoryInfo getPostDirectoryInfo(final String title); BlogTreeMenuNavigation getLeftMenus();  }