Esempio n. 1
0
        private void StartLoad()
        {
            EmptyMenu();
            DisableInfo();
            DataTable dt = ShippingActions.GetShipping();

            SetTitle("Pasirinkite siuntą");
            dViewDataShow.DataSource            = dt;
            dViewDataShow.Columns[0].HeaderText = "Siuntos Id";
            dViewDataShow.Columns[1].HeaderText = "Siuntos numeris";
            dViewDataShow.Columns[2].HeaderText = "Sukurtas";
            dViewDataShow.Select();
            ShowDataShow();
            processMethod = new Action(StartLoading);
        }
Esempio n. 2
0
        private void LoadUnloadBarcode()
        {
            string  ScannedBarcode = NullCheck.IsNullString(tBoxInput1.Text);
            DataRow row            = ItemList.AsEnumerable().Where(x => x.Field <string>("Barcode") == ScannedBarcode).FirstOrDefault();

            ShippingActions.LoadCU(NullCheck.IsNullInt(row["StoredPalletId"]));
            ItemList.Rows.Remove(row);
            ClearInput();
            if (ItemList.Rows.Count > 0)
            {
                ProcessCULoading();
            }
            else
            {
                ProcessLoading();
            }
        }
Esempio n. 3
0
        public void Test()
        {
            var extentTest           = _extentReportUtils.StartTest(_report, "Checkout an item");
            var homePageActions      = new HomePageActions(_webDriver);
            var searchResultsActions = new SearchResultsActions(_webDriver);
            var itemDetailsActions   = new ItemDetailsActions(_webDriver);
            var cartActions          = new YourCartActions(_webDriver);
            var checkoutInfoActions  = new CheckoutInformationActions(_webDriver);
            var shippingActions      = new ShippingActions(_webDriver);
            var paymentActions       = new PaymentAndReviewActions(_webDriver);
            var confirmationActions  = new ConfirmationActions(_webDriver);
            var pathToTheScreenshot  = _screenshotUtils.GetPathForScreenshot();
            var pathToTheScreenshot1 = _screenshotUtils.GetPathForScreenshot();

            homePageActions.NavigateToHomePage();
            homePageActions.SearchForAnItem("fluke");
            searchResultsActions.SelectTheSecondItem();
            itemDetailsActions.AddToCart();
            itemDetailsActions.ViewCart(pathToTheScreenshot);
            _ = extentTest.Log(AventStack.ExtentReports.Status.Info, "Modal screenshot captured").
                AddScreenCaptureFromPath(pathToTheScreenshot);

            cartActions.EnterQuantity("2");
            cartActions.Checkout();
            checkoutInfoActions.FillOutDefaultInformation();
            checkoutInfoActions.ContinueToShippingMethod();
            shippingActions.SelectThreeDayShipping();
            shippingActions.AddSignatureRequired();
            shippingActions.ContinueToPaymentMethod();
            paymentActions.EnterPaymentInformation();
            paymentActions.SubmitOrder();

            var confirmationNumber = confirmationActions.GetOrderNumber();

            _screenshotUtils.TakeAScreenshot(_webDriver, pathToTheScreenshot1);

            Assert.That(confirmationNumber, Is.Not.Null);
            _ = extentTest.Log(AventStack.ExtentReports.Status.Info, $"Order Number: {confirmationNumber}").
                AddScreenCaptureFromPath(pathToTheScreenshot1);
            _ = extentTest.Pass("Successfully checked out an item");
        }
Esempio n. 4
0
 private void StartLoading()
 {
     ResetMenu();
     HideMenu();
     try
     {
         Cache.AddParameter("@ShippingId", dViewDataShow.SelectedRows[0].Cells[0].Value);
         Cache.AddParameter("@ShippingNo", dViewDataShow.SelectedRows[0].Cells[1].Value);
     }
     catch
     {
         StartLoad();
         return;
     }
     HideDataShow();
     SetTitle("Pakrovimas");
     ItemList = ShippingActions.GetRelatedCU();
     EnableRows(3, 6);
     SetRow3($"Siunta: {Cache.ReturnValueByKey("@ShippingNo")}", ContentAlignment.MiddleLeft);
     SetRow6($"Nuskenuokite paletės barkodą", ContentAlignment.MiddleCenter);
     EnableInput(true);
     EnableBoxDescriptionRows(row1: true);
     SetTextBoxLabel1("Barkodas:");
     FocusInput1();
     if (ItemList != null && ItemList.Rows.Count > 0)
     {
         ProcessLoading();
     }
     else
     {
         DisableInfo();
         EnableRows(5);
         SetRow5("Nėra nepakrautų palečių", ContentAlignment.MiddleCenter, Color.Red);
         HideInput();
         this.Select();
         processMethod = new Action(StartLoad);
     }
 }