Exemplo n.º 1
0
        public void AddItemtoDefaultList()
        {
            APIndexPage indexPage = new APIndexPage(Driver, Url);

            APLoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login("test", "1234");

            manufacturerOption = indexPage.Header.GetManufacturerDropdownOptions().ElementAtOrDefault(2);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            APCartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Thread.Sleep(5000);

            CartMainPage.ClickAddtoListLink();

            CartMainPage.ClickAddtoListButton();

            Assert.IsTrue(CartMainPage.SuccessMessageAdded(), "Items was not Added to any List");

            CartMainPage.ClickCloseModalLink();
        }
Exemplo n.º 2
0
        public void ValidateAvailability_Cart_Equals_Checkout()
        {
            IndexPage indexPage = new IndexPage(driver, url);

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login("*****@*****.**", "1234");

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Thread.Sleep(5000);

            IDictionary <string, string> cartAvailabiltyItemsTag = CartMainPage.AvailabiltyTagGet();
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);
            IDictionary <string, string> checkoutAvailabiltyItemsTag = checkoutPage.AvailabiltyTagGet();

            foreach (var tag in checkoutAvailabiltyItemsTag)
            {
                Assert.AreEqual(cartAvailabiltyItemsTag[tag.Key], tag.Value);
            }
        }
Exemplo n.º 3
0
        public void CarRefreshSFLANON_T5502()
        {
            var indexPage = new IndexPage(driver, url);

            indexPage.Header.SelectManufacturer(2);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            catalogItemPage.WaitForAppBusy();

            CartPage cartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Move items to Save For Later section
            cartMainPage.MovetoSFL();

            //TODO
            //wait until save for later section has rendered
            Thread.Sleep(5000);

            Assert.IsTrue(cartMainPage.HeadsUpCartInfo(), "Cart is not Empty");

            cartMainPage.SeeSFLItems();

            Assert.IsTrue(cartMainPage.MovetoCartLinkEnable(), "Save For Later Section is Empty");
        }
Exemplo n.º 4
0
        public void CarRefresh_ProductDetails()
        {
            var indexPage = new IndexPage(driver, url);

            indexPage.Header.SelectManufacturer(2);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            catalogItemPage.WaitForAppBusy();

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //TODO
            //wait until cart loading is done
            //Thread.Sleep(5000);

            Assert.IsTrue(CartMainPage.ImageSectionInCart(), "Image is not Displayed");

            Assert.IsTrue(CartMainPage.TitleSectionIsDisplayed(), "Title is not Displayed");

            Assert.IsTrue(CartMainPage.SKUSectionIsDisplayed(), "SKU Section is not Displayed");

            Assert.IsTrue(CartMainPage.LineItemSectionIsDisplayed(), "Prices or Quantity are not Displayed");

            Assert.IsTrue(CartMainPage.AddToListLink(), "Add to list Link is not displayed");
        }
Exemplo n.º 5
0
        public void ValidateAvailabilityIsDisplay()
        {
            IndexPage indexPage = new IndexPage(driver, url);

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login("*****@*****.**", "1234");

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Thread.Sleep(2000);

            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(2000);
            IDictionary <string, string> availabiltyItemsTag = checkoutPage.AvailabiltyTagGet();

            Assert.IsTrue(availabiltyItemsTag.Count() > 0);
        }
Exemplo n.º 6
0
        public void Availability_OutOfStock()
        {
            IndexPage indexPage = new IndexPage(driver, url);

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login("*****@*****.**", "1234");

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Thread.Sleep(2000);

            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(2000);
            IDictionary <string, string> availabiltyItemsTag = checkoutPage.AvailabiltyTagGet();

            Assert.IsNotNull(availabiltyItemsTag.FirstOrDefault(t => t.Value.Contains(AvailabiltyConstants.OutOfStockGeneral)));
        }
Exemplo n.º 7
0
        //[TestCategory(TestCategoriesConstants.NoTestData)]
        public void ValidateItemtoInDefaultList()
        {
            APIndexPage indexPage = new APIndexPage(Driver, Url);

            APLoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login("*****@*****.**", "1234");

            manufacturerOption = indexPage.Header.GetManufacturerDropdownOptions().ElementAt(2);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            APCartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Thread.Sleep(5000);

            CartMainPage.ClickAddtoListLink();

            CartMainPage.ClickAddtoListButton();

            PageObjects.ListPOM.HomePagePOM.APListHomePage listPage = CartMainPage.VisitListButton();

            Assert.IsTrue(listPage.DefaultTitlePage(), "User was not redirected to List Page");
        }
Exemplo n.º 8
0
        public void BillingInfoAUTH_T6208()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                user = dataFactory.CreateLoginAccount(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(5000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(3000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            //checkoutPage.SelectFirstInAddressDropDown();

            checkoutPage.ClickShippingButton();

            checkoutPage.SelectBillingRadioButton(BillingSelectOptions.Existing);

            //checkoutPage.SelectFirstInBillingDropDown();

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            checkoutPage.BillingSubmitClick();
        }
Exemplo n.º 9
0
        public void CarRefreshWhenAddedANON_T5504()
        {
            var indexPage = new IndexPage(driver, url);

            //select the third option on the dropdown by index
            indexPage.Header.SelectManufacturer(2);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            //wait until busy animation is present
            catalogItemPage.WaitForAppBusy();

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();
        }
Exemplo n.º 10
0
        public void Freeshipping_T1292()
        {
            var indexPage = new APIndexPage(Driver, Url);

            //TODO
            //use a datafactory tool instead csv (shipping.csv)
            var testData = new
            {
                email    = "Email",
                password = "******",

                country      = "Country",
                countryShort = "CountryShort",
                address      = "StreetAddress",
                state        = "State",
                city         = "City",
                zipCode      = "ZipCode",
                apt          = "Apt",

                firstname   = "FirstName",
                lastname    = "LastName",
                company     = "Company",
                phonenumber = "PhoneNumber"
            };

            APLoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.email, testData.password);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            APCartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Assert.IsTrue(CartMainPage.totalsInformationDislayed(), "Totals are not displayed");

            Assert.IsTrue(CartMainPage.FindCongraMessage(), "Congratulation message is missing");
        }
Exemplo n.º 11
0
        public void CarRefreshWhenRemovedANON_T5503()
        {
            var indexPage = new IndexPage(driver, url);

            //New method for Manufacturer dropdown
            indexPage.Header.SelectManufacturer(2);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            //wait until busy animation is done
            catalogItemPage.WaitForAppBusy();

            CartPage cartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Assert.IsTrue(cartMainPage.HeadsUpCartInfo(), "Totals are not displayed");
        }
Exemplo n.º 12
0
        public void TBD_ShippingServiceLevels()
        {
            var indexPage = new APIndexPage(Driver, Url);

            //TODO
            //test data should be improved to use a datafactory instead csv (shipping.csv)"
            var testData = new
            {
                email        = "Email",
                password     = "******",
                country      = "Country",
                countryShort = "CountryShort",
                address      = "StreetAddress",
                state        = "State",
                city         = "City",
                zipCode      = "ZipCode",
                apt          = "Apt",
                firstname    = "FirstName",
                lastname     = "LastName",
                company      = "Company",
                phonenumber  = "PhoneNumber",
            };

            APLoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.email, testData.password);


            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            APCartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            string TBDtext = CartMainPage.GetShippingServiceLevelsTDB();

            Assert.IsTrue("TBD".Equals(TBDtext), "TBD Message is not Present, please use another Test User");
        }
Exemplo n.º 13
0
        public void HandlingFeeMsg()
        {
            var indexPage = new APIndexPage(Driver, Url);

            //TODO
            //use a datafactory tool instead csv (shipping.csv)
            var testData = new
            {
                email        = "Email",
                password     = "******",
                country      = "Country",
                countryShort = "CountryShort",
                address      = "StreetAddress",
                state        = "State",
                city         = "City",
                zipCode      = "ZipCode",
                apt          = "Apt",
                firstname    = "FirstName",
                lastname     = "LastName",
                company      = "Company",
                phonenumber  = "PhoneNumber"
            };

            APLoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.email, testData.password);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            APCartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Thread.Sleep(5000);

            //Handling Fee should be coded
        }
Exemplo n.º 14
0
        public void TBD_ShippingServiceLevels()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                email        = (string)testContext.DataRow["Email"],
                password     = testContext.DataRow["Password"].ToString(),
                country      = (string)testContext.DataRow["Country"],
                countryShort = (string)testContext.DataRow["CountryShort"],
                address      = (string)testContext.DataRow["StreetAddress"],
                state        = (string)testContext.DataRow["State"],
                city         = (string)testContext.DataRow["City"],
                zipCode      = testContext.DataRow["ZipCode"].ToString(),
                apt          = testContext.DataRow["Apt"].ToString(),
                firstname    = (string)testContext.DataRow["FirstName"],
                lastname     = (string)testContext.DataRow["LastName"],
                company      = (string)testContext.DataRow["Company"],
                phonenumber  = testContext.DataRow["PhoneNumber"].ToString(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.email, testData.password);


            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            string TBDtext = CartMainPage.GetShippingServiceLevelsTDB();

            Assert.IsTrue("TBD".Equals(TBDtext), "TBD Message is not Present, please use another Test User");
        }
Exemplo n.º 15
0
        public void ShippingProximity_T1293()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                email        = (string)testContext.DataRow["Email"],
                password     = testContext.DataRow["Password"].ToString(),
                country      = (string)testContext.DataRow["Country"],
                countryShort = (string)testContext.DataRow["CountryShort"],
                address      = (string)testContext.DataRow["StreetAddress"],
                state        = (string)testContext.DataRow["State"],
                city         = (string)testContext.DataRow["City"],
                zipCode      = testContext.DataRow["ZipCode"].ToString(),
                apt          = testContext.DataRow["Apt"].ToString(),
                firstname    = (string)testContext.DataRow["FirstName"],
                lastname     = (string)testContext.DataRow["LastName"],
                company      = (string)testContext.DataRow["Company"],
                phonenumber  = testContext.DataRow["PhoneNumber"].ToString(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.email, testData.password);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Assert.IsTrue(CartMainPage.totalsInformationDislayed(), "Totals are not displayed");

            Assert.IsTrue(CartMainPage.proximtyMessageDisplayed(), "Proximity message is missing");
        }
Exemplo n.º 16
0
        public void HandlingFeeMsg()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                email        = (string)testContext.DataRow["Email"],
                password     = testContext.DataRow["Password"].ToString(),
                country      = (string)testContext.DataRow["Country"],
                countryShort = (string)testContext.DataRow["CountryShort"],
                address      = (string)testContext.DataRow["StreetAddress"],
                state        = (string)testContext.DataRow["State"],
                city         = (string)testContext.DataRow["City"],
                zipCode      = testContext.DataRow["ZipCode"].ToString(),
                apt          = testContext.DataRow["Apt"].ToString(),
                firstname    = (string)testContext.DataRow["FirstName"],
                lastname     = (string)testContext.DataRow["LastName"],
                company      = (string)testContext.DataRow["Company"],
                phonenumber  = testContext.DataRow["PhoneNumber"].ToString(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.email, testData.password);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Thread.Sleep(5000);

            //Handling Fee should be coded
        }
Exemplo n.º 17
0
        public void Availability_InStock_AddressSelect()
        {
            IndexPage indexPage = new IndexPage(driver, url);

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login("*****@*****.**", "1234");

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            Thread.Sleep(2000);

            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(2000);
            IDictionary <string, string> availabiltyItemsTagPre = checkoutPage.AvailabiltyTagGet();

            Assert.IsNotNull(availabiltyItemsTagPre.FirstOrDefault(t => t.Value.Contains(AvailabiltyConstants.InStock)));

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            checkoutPage.SelectFirstInAddressDropDown();

            checkoutPage.ShippingSubmitClick();

            IDictionary <string, string> availabiltyItemsTagPos = checkoutPage.AvailabiltyTagGet();

            Assert.IsNotNull(availabiltyItemsTagPos.FirstOrDefault(t => t.Value.Contains(AvailabiltyConstants.InStock)));
        }
Exemplo n.º 18
0
        public void ReviewPlaceOrderAUTH_T6208()
        {
            var indexPage = new APIndexPage(Driver, Url);

            APLoginPage loginPage = indexPage.Header.ClickOnSignIn();

            //TODO
            //implement data factory here
            indexPage = loginPage.Login("", "");

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            APCartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(5000);

            //Click on Proceed to checkout button
            APCheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            checkoutPage.BillingSubmitClick();

            Thread.Sleep(5000);

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            checkoutPage.PlaceOrderSubmitClick();
        }
Exemplo n.º 19
0
        public void ValidateAllElementsInConfirmationPage()
        {
            IndexPage indexPage = new IndexPage(driver, url);

            var user = dataFactory.CreateLoginAccount();

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(user.Email, user.Password);

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInAddressDropDown();

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4596502148863902",
                ExpirationMont = "03",
                ExpirationYear = "20",
                HolderName     = "Dixie Green",
                Cvv            = "775"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInBillingDropDown();

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            Thread.Sleep(5000);

            checkoutPage.BillingSubmitClick();

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");

            Assert.IsTrue(orderpage.SuccessMsgIsPresent(), "Success Alert Message is not Displayed");

            Assert.IsTrue(orderpage.CustomerInfoIsDisplayed(), "Customer Information is not displayed");

            Assert.IsTrue(orderpage.ShippingInfoIsDisplayed(), "Shipping Information is not displayed");

            Assert.IsTrue(orderpage.BillingInfoIsDisplayed(), "Billing Information is not displayed");

            Assert.IsTrue(orderpage.listOfItemsDisplayed(), "List Item View is not Displaying Items");
        }
Exemplo n.º 20
0
        public void OrderConfirmationAUTH_()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                user = dataFactory.CreateLoginAccount(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(5000);

            //Click on Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            checkoutPage.BillingSubmitClick();

            Thread.Sleep(2000);

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(2000);

            checkoutPage.PlaceOrderSubmitClick();

            Thread.Sleep(2000);

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");

            Thread.Sleep(2000);

            Assert.IsTrue(checkoutPage.SuccessText(), "Success text is not available");
        }
Exemplo n.º 21
0
        public void CheckoutPageANON_T6208()
        {
            bool isAppBusy;

            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                email        = (string)testContext.DataRow["Email"],
                pwd          = testContext.DataRow["Password"].ToString(),
                country      = (string)testContext.DataRow["Country"],
                countryShort = (string)testContext.DataRow["CountryShort"],
                address      = (string)testContext.DataRow["StreetAddress"],
                state        = (string)testContext.DataRow["State"],
                city         = (string)testContext.DataRow["City"],
                zipCode      = testContext.DataRow["ZipCode"].ToString(),
                apt          = testContext.DataRow["Apt"].ToString(),
                firstname    = (string)testContext.DataRow["FirstName"],
                lastname     = (string)testContext.DataRow["LastName"],
                company      = (string)testContext.DataRow["Company"],
                phonenumber  = testContext.DataRow["PhoneNumber"].ToString(),
                attn         = testContext.DataRow["ATTN"].ToString(),
            };

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(5000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            //Redirected to Login Page
            Assert.IsNull(checkoutPage);

            //Click on Proceed as Guest
            LoginPage loginPage = new LoginPage(driver);

            checkoutPage = loginPage.clickOnGuestbutton();

            //Wait for loading checkout
            Thread.Sleep(3000);

            checkoutPage.SetContactElement(ContactInputs.FirstName, testData.firstname);

            checkoutPage.SetContactElement(ContactInputs.LastName, testData.lastname);

            checkoutPage.SetContactElement(ContactInputs.PhoneNumber, testData.phonenumber);

            checkoutPage.SetContactElement(ContactInputs.Email, testData.email);

            Assert.IsTrue(checkoutPage.ContactButtonIsEnable(), "Proceed to Shipping Information button is not available");

            checkoutPage.ContactSubmitClick();

            isAppBusy = checkoutPage.IsAppBusy();

            Assert.IsFalse(isAppBusy);

            checkoutPage.SetAddressElement(AddressInputs.ATTN, testData.attn);

            checkoutPage.SetAddressElement(AddressInputs.StreetAddress, testData.address);

            checkoutPage.SetAddressElement(AddressInputs.Apt, testData.apt);

            checkoutPage.SetAddressElement(AddressInputs.City, testData.city);

            checkoutPage.SetAddressElement(AddressInputs.State, testData.state);

            checkoutPage.SetAddressElement(AddressInputs.Postal, testData.zipCode);

            Assert.IsTrue(checkoutPage.ShippingButtonIsEnable(), "Proceed to Secure Billing button is not available");

            checkoutPage.ShippingSubmitClick();
        }
Exemplo n.º 22
0
        public void AddAddressChecktoutoMyAccount()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                user         = dataFactory.CreateLoginAccount(),
                country      = (string)testContext.DataRow["Country"],
                countryShort = (string)testContext.DataRow["CountryShort"],
                address      = (string)testContext.DataRow["StreetAddress"],
                state        = (string)testContext.DataRow["State"],
                city         = (string)testContext.DataRow["City"],
                zipCode      = testContext.DataRow["ZipCode"].ToString(),
                apt          = testContext.DataRow["Apt"].ToString(),
                firstname    = (string)testContext.DataRow["FirstName"],
                lastname     = (string)testContext.DataRow["LastName"],
                company      = (string)testContext.DataRow["Company"],
                phonenumber  = testContext.DataRow["PhoneNumber"].ToString(),
                attn         = testContext.DataRow["ATTN"].ToString(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            //checkoutPage.SelectAddressRadioButton(AddressSelectOptions.New);

            Thread.Sleep(5000);

            checkoutPage.SetAddressElement(AddressInputs.ATTN, testData.attn);

            checkoutPage.SetAddressElement(AddressInputs.StreetAddress, testData.address);

            checkoutPage.SetAddressElement(AddressInputs.Apt, testData.apt);

            checkoutPage.SetAddressElement(AddressInputs.City, testData.city);

            checkoutPage.SetAddressElement(AddressInputs.State, testData.state);

            checkoutPage.SetAddressElement(AddressInputs.Postal, testData.zipCode);

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            //checkoutPage.SelectBillingRadioButton(BillingSelectOptions.Existing);
            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInBillingDropDown();

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            Thread.Sleep(5000);

            checkoutPage.BillingSubmitClick();

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            //checkoutPage.PlaceOrderSubmitClick();
            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");

            //CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            indexPage = orderpage.ContinueShoppingClick();

            //AddressesHomePage addresspage = indexPage.Header.ClickOnAddresses();

            //var dropdownItems = addresspage.GetAddressesDropdownItems(AccessLevel.User).ToList();

            ////just created address data
            //string createdAddress = string.IsNullOrEmpty(testData.apt) ?
            //    $"{testData.address}, {testData.city} {testData.countryShort} {testData.zipCode}"
            //    :
            //    $"{testData.address}, {testData.apt}, {testData.city} {testData.countryShort} {testData.zipCode}";

            ////search the address in the user level dropdown
            //string expectedAddress = dropdownItems.FirstOrDefault(x => x.Contains(createdAddress));

            //Assert.IsNotNull(expectedAddress, "Address is not found in dropdown");
        }
Exemplo n.º 23
0
        public void GoogleTypeAheadAUTH_T6208()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                email        = (string)testContext.DataRow["Email"],
                password     = testContext.DataRow["Password"].ToString(),
                country      = (string)testContext.DataRow["Country"],
                countryShort = (string)testContext.DataRow["CountryShort"],
                address      = (string)testContext.DataRow["StreetAddress"],
                state        = (string)testContext.DataRow["State"],
                city         = (string)testContext.DataRow["City"],
                zipCode      = testContext.DataRow["ZipCode"].ToString(),
                apt          = testContext.DataRow["Apt"].ToString(),
                firstname    = (string)testContext.DataRow["FirstName"],
                lastname     = (string)testContext.DataRow["LastName"],
                company      = (string)testContext.DataRow["Company"],
                phonenumber  = testContext.DataRow["PhoneNumber"].ToString(),
                attn         = testContext.DataRow["ATTN"].ToString(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.email, testData.password);

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(5000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.New);

            checkoutPage.SetAddressElement(AddressInputs.ATTN, testData.attn);

            checkoutPage.SetAddressElement(AddressInputs.StreetAddress, testData.address);

            checkoutPage.SetAddressElement(AddressInputs.Apt, testData.apt);

            checkoutPage.SetAddressElement(AddressInputs.City, testData.city);

            checkoutPage.SetAddressElement(AddressInputs.State, testData.state);

            checkoutPage.SetAddressElement(AddressInputs.Postal, testData.zipCode);

            Assert.IsTrue(checkoutPage.ShippingButtonIsEnable(), "Proceed to Secure Billing button is not available");
        }
Exemplo n.º 24
0
        public void E2ETestwithContactInfoandAddressUser()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                //Make sure to change name of email
                user         = dataFactory.CreateLoginAccount(),
                country      = (string)testContext.DataRow["Country"],
                countryShort = (string)testContext.DataRow["CountryShort"],
                address      = (string)testContext.DataRow["StreetAddress"],
                state        = (string)testContext.DataRow["State"],
                city         = (string)testContext.DataRow["City"],
                zipCode      = testContext.DataRow["ZipCode"].ToString(),
                apt          = testContext.DataRow["Apt"].ToString(),
                firstname    = (string)testContext.DataRow["FirstName"],
                lastname     = (string)testContext.DataRow["LastName"],
                company      = (string)testContext.DataRow["Company"],
                phonenumber  = testContext.DataRow["PhoneNumber"].ToString(),
                attn         = testContext.DataRow["ATTN"].ToString(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInAddressDropDown();

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInBillingDropDown();

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            Thread.Sleep(5000);

            checkoutPage.BillingSubmitClick();

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");
        }
Exemplo n.º 25
0
        public void OnlyPaymentMethodAdded()
        {
            var indexPage = new APIndexPage(Driver, Url);

            var testData = new
            {
                //Make sure to change name of email
                user = dataFactory.CreateLoginAccount(),
            };

            APLoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            Thread.Sleep(2000);

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            APCartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            APCheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SetAddressElement(AddressInputs.ATTN, "CompanyOrName");
            checkoutPage.SetAddressElement(AddressInputs.StreetAddress, "123 Massachusetts Avenue");
            checkoutPage.SetAddressElement(AddressInputs.Apt, "12345");
            checkoutPage.SetAddressElement(AddressInputs.City, "Cambridge");
            checkoutPage.SetAddressElement(AddressInputs.State, "MA");
            checkoutPage.SetAddressElement(AddressInputs.Postal, "02138");

            checkoutPage.ClickShippingButton();

            //Thread.Sleep(2000);

            Thread.Sleep(5000);

            checkoutPage.SelectBillingRadioButton(BillingSelectOptions.New);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(2000);

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            checkoutPage.BillingSubmitClick();

            Thread.Sleep(3000);

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");
        }
Exemplo n.º 26
0
        public void OnlyContactInformationadded()
        {
            var indexPage = new APIndexPage(Driver, Url);

            var testData = new
            {
                //Make sure to change name of email
                user = dataFactory.CreateLoginAccount(),
            };

            APLoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            APCartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            APCheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInAddressDropDown();

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInBillingDropDown();

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            Thread.Sleep(5000);

            checkoutPage.BillingSubmitClick();

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");
        }
Exemplo n.º 27
0
        public void E2ETestwithContactInfoandAddressUser()
        {
            var indexPage = new APIndexPage(Driver, Url);

            //TODO
            //use a datafactory tool instead csv (checkout.csv)
            var testData = new
            {
                country      = "Country",
                countryShort = "CountryShort",
                address      = "StreetAddress",
                state        = "State",
                city         = "City",
                zipCode      = "ZipCode",
                apt          = "Apt",
                firstname    = "FirstName",
                lastname     = "LastName",
                company      = "Company",
                phonenumber  = "PhoneNumber",
                attn         = "ATTN",
            };

            APLoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login("test", "1234");

            manufacturerOption = indexPage.Header.GetManufacturerDropdownOptions().ElementAtOrDefault(2);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            APCartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            APCheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInAddressDropDown();

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInBillingDropDown();

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            Thread.Sleep(5000);

            checkoutPage.BillingSubmitClick();

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");
        }