public void UserEntersCredential(string credentials) { authentcation = new Authentcation(driver); switch (credentials) { case "Valid Credentials": authentcation.enterCredentials(AuthenticationTestData.validEmailAddress, AuthenticationTestData.validPassword); break; case "Invalid Credentials": authentcation.enterCredentials(AuthenticationTestData.inValidEmailAddress, AuthenticationTestData.validPassword); break; default: Console.WriteLine("Can't read input"); break; } }
public void UserShouldBeNavigatedTo(string pageName) { System.Threading.Thread.Sleep(3000); switch (pageName) { case "authentication": authentcation = new Authentcation(driver); Assert.AreEqual(authentcation.getAutenticationPageURL(), driver.Url); break; case "Account creation": accountCreation = new AccountCreation(driver); Assert.AreEqual(accountCreation.getAccountCreationPageUrl(), driver.Url); break; case "My Account": myAccount = new MyAccount(driver); Assert.AreEqual(myAccount.getMyAccountPageUrlPageUrl(), driver.Url); break; case "Blouses": product = new Product(driver); Assert.AreEqual(product.getCategoryPageUrl(), driver.Url); break; case "PaymentMethod": Assert.AreEqual(product.getPaymentMethodUrl(), driver.Url); break; default: Console.WriteLine("Can't find this page"); break; } }