Ejemplo n.º 1
0
        public void TheOrderPlacedSoftekTest(String promoCode, String firstName, String lastName, String nameOnCard, String cardNumber, String expirationDate, String cvv)
        {
            //driver.Navigate().GoToUrl("https://qaautomation-test.s3-eu-west-1.amazonaws.com/index.html");
            // driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(1200);
            Thread.Sleep(3000);

            inputPage.editPromocode.Text = promoCode;
            inputPage.buttonSubmitpromo.Click();
            inputPage.buttonSubmit.Click();
            inputPage.editFirstName.Text  = firstName;
            inputPage.editLastName.Text   = lastName;
            inputPage.editcardName.Text   = nameOnCard;
            inputPage.editcardNumber.Text = cardNumber;
            inputPage.editExpiraton.Text  = expirationDate;
            inputPage.editCvv.Text        = cvv;
            inputPage.buttonSubmit.Click();
            //        Assert.True(resultsPage.IsTextPresent("Valid first name is required."));
            inputPage.CaptureSceenShot(Path.GetFullPath("/home/wers4/Projects/Qaautomation_softek/Qaautomation_softek//image002.png"));

            resultsPage = new ResultsPage(driver);
            resultsPage.buttonSubmit.Click();
            Assert.True(resultsPage.IsTextPresent("Valid first name is required."));
            resultsPage.CaptureSceenShot(Path.GetFullPath("/home/wers4/Projects/Qaautomation_softek/Qaautomation_softek/image001.png"));
        }