public PostPage Create(Type template) { EditorPage editorPage = ClickOnAddArticle(); ArticleBase articleBase = editorPage.ClickOnTemplate(Templates.FindIndex(x => x == template)); articleBase.ClickOnMagicStick(2); articleBase.WriteTitle(Title); PreviewPage previewPage = articleBase.ClickOnPreviewBtn(); PostPage postPage = previewPage.ClickOnPublishBtn(); postPage.ValidatePostCreated(Title); var parsedTitle = new string(Title.ToCharArray().Where(c => char.IsLetter(c) || c == '-').ToArray()).Replace("posts", "").Replace("-", " "); Title = parsedTitle.Trim(); return(new PostPage(_browser)); }