コード例 #1
0
        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;
            }


        }