public void GivenIClickTheCheckoutAsGuestButton()
        {
            MKLoginPage loginPage = (MKLoginPage)ScenarioContext.Current["loginPage"];
            loginPage.checkoutAsGuestButton.Click();
            MKCheckoutPage1 checkoutPage1 = new MKCheckoutPage1(driver);
            IWebElement checkoutPage1Input = wait.Until(ExpectedConditions.ElementIsVisible(By.Id(checkoutPage1.firstNameInput.GetAttribute("id"))));
            Assert.IsTrue(checkoutPage1Input.Displayed);
            ScenarioContext.Current["checkoutPage1"] = checkoutPage1;

        }
Пример #2
0
 public void GivenIAmOnTheFirstCheckoutPage()
 {
     MKShoppingCartPage shoppingCartPage = (MKShoppingCartPage)ScenarioContext.Current["shoppingCartPage"];
     IWebElement shoppingCartCheckoutButton = wait.Until(ExpectedConditions.ElementIsVisible(By.Id(shoppingCartPage.checkoutButton.GetAttribute("id"))));
     shoppingCartCheckoutButton.Click();
     MKLoginPage loginPage = new MKLoginPage(driver);
     IWebElement loginPageCheckoutButton = wait.Until(ExpectedConditions.ElementToBeClickable(By.Id(loginPage.checkoutAsGuestButton.GetAttribute("id"))));
     loginPageCheckoutButton.Click();
     MKCheckoutPage1 checkoutPage1 = new MKCheckoutPage1(driver);
     IWebElement checkoutPage1Input = wait.Until(ExpectedConditions.ElementIsVisible(By.Id(checkoutPage1.lastNameInput.GetAttribute("id"))));
     Assert.IsTrue(checkoutPage1Input.Displayed);
     ScenarioContext.Current["checkoutPage1"] = checkoutPage1;
 }