public DoYouHaveAStoryPage GoToHaveYorSayPage() { HomePage homePage = new HomePage(_driver); homePage.GoToPage(); NewsPage newsPage = homePage.GoToNewsPage(); HaveYourSayPage haveYourSayPage = newsPage.GoToHaveYourSayPage(); DoYouHaveAStoryPage doYouHaveAStoryPage = haveYourSayPage.GoToDoYouHaveAStoryPage(); return(doYouHaveAStoryPage); }
/// <summary> /// Going to the DoYouHaveAStory page through the Home page, News page, HaveYourSay page and make screenshot. /// </summary> /// <param name="dataDictr">Filling out personal information fields using a dictionary</param> /// <param name="makeScreenIfTrue">Make screenshot if true else click Submit</param> /// <param name="checkbox">Mark checkbox</param> public void GoToHaveYorSayPage_FillFieldsAndCheckboxTrue_MakeScreenshotOrClickSubmit(Dictionary <string, string> dataDictr, bool checkbox, bool makeScreenIfTrue) { DoYouHaveAStoryPage doYouHaveAStoryPage = GoToHaveYorSayPage(); doYouHaveAStoryPage.EnterTextToFields(dataDictr); doYouHaveAStoryPage.MarkDailyCheckbox(checkbox); if (makeScreenIfTrue) { MakeScreenshot(); } else { doYouHaveAStoryPage.ClickSubmitButton(); } }