public void GivenIAmOnThePage(string pageName) { switch (pageName) { case "Login": { StrapiLoginPage.Navigate(); var result = StrapiLoginPage.BrowserIsOnLoginPage; Assert.True(result, "Was not taken to Strapi login page"); break; } case "Home": { StrapiHomePage.Navigate(); var result = StrapiHomePage.BrowserIsOnHomePage; Assert.True(result, "Was not taken to Strapi homepage"); break; } case "Strapi Data Dictionaries": { StrapiDataDictionariesPage.Navigate(); Assert.True(StrapiDataDictionariesPage.IsOnCorrectPage(), "Was not taken to Data Dictionary page"); } break; case "Strapi Data Dictionary Entities": { StrapiDataDictionaryEntitiesPage.Navigate(); Assert.True(StrapiDataDictionaryEntitiesPage.IsOnCorrectPage(), "Was not taken to Data Dictionary Entities page"); } break; case "Strapi Data Dictionary Fields": { StrapiDataDictionaryFieldsPage.Navigate(); Assert.True(StrapiDataDictionaryFieldsPage.IsOnCorrectPage(), "Was not taken to Data Dictionary Fields page"); } break; case "Strapi Intro": { StrapiIntroPage.Navigate(); Assert.True(StrapiIntroPage.IsOnCorrectPage(), "Was not taken to Strapi Intro page"); } break; case "Strapi Release Schedule": { StrapiReleaseSchedulePage.Navigate(); Assert.True(StrapiReleaseSchedulePage.IsOnCorrectPage(), "Was not taken to Strapi Release Schedule page"); } break; } }
public static void BeforeFeatureLogin() { StrapiLoginPage.Navigate(); StrapiLoginPage.Login("*****@*****.**", Config.AdminAccountPassword); }