public void GivenIClickTheButtonToProceedToPaymentAndReview() { MKCheckoutPage1 checkoutPage1 = (MKCheckoutPage1)ScenarioContext.Current["checkoutPage1"]; checkoutPage1.proceedToPaymentAndReviewButton.Click(); MKCheckoutPage2 checkoutPage2 = new MKCheckoutPage2(driver); IWebElement checkoutPage2Input = wait.Until(ExpectedConditions.ElementIsVisible(By.Id(checkoutPage2.paymentTypeSelector.GetAttribute("id")))); Assert.IsTrue(checkoutPage2Input.Displayed); ScenarioContext.Current["checkoutPage2"] = checkoutPage2; }
public void GivenIAmOnTheSecondCheckoutPage() { MKCheckoutPage1 checkoutPage1 = (MKCheckoutPage1)ScenarioContext.Current["checkoutPage1"]; IWebElement checkoutPage1Input = wait.Until(ExpectedConditions.ElementIsVisible(By.Id(checkoutPage1.lastNameInput.GetAttribute("id")))); Assert.IsTrue(checkoutPage1Input.Displayed); checkoutPage1.completeForm(); checkoutPage1.proceedToPaymentAndReviewButton.Click(); MKCheckoutPage2 checkoutPage2 = new MKCheckoutPage2(driver); IWebElement checkoutPage2Button = wait.Until(ExpectedConditions.ElementIsVisible(By.Id(checkoutPage2.submitOrderButton.GetAttribute("id")))); Assert.IsTrue(checkoutPage2Button.Displayed); ScenarioContext.Current["checkoutPage2"] = checkoutPage2; }