예제 #1
0
        public void GoToChangePassword(bool isFTL)
        {
            Driver.Click(lblProfile, "Click profile dropdown");
            Driver.Click(lnkProfilePage, "Click 'Profile' to navigate to user profile");
            UserProfilePage profile = new UserProfilePage(Driver, Assert);

            profile.ChangePassword(isFTL);
        }
예제 #2
0
        public void GetConfirmationFTL(string truckType, bool verifyLoadinShipmentHistory = false)
        {
            Driver.WaitForCondition(d => Driver.IsDisplayed(lblThankYou, "Validate Thank you text"), "Wait for Thank you text to load");
            long ConfirmationId = Convert.ToInt64(Driver.FindElement(lblConfirmationId).Text);
            var  bolId          = (from ft in DataContext30.loads where ft.load_id == ConfirmationId select ft.load_id).SingleOrDefault();

            Assert.AreEqual(ConfirmationId, bolId, "Validate BOL in database");

            int      pckDays      = WC.HolidayMonth(DateTime.Today, InputData.Data.numPickupDays);
            DateTime pickupDate   = DateTime.Today.AddDays(pckDays);
            int      delDays      = WC.HolidayMonth(pickupDate, InputData.Data.numDeliveryDays);
            DateTime deliveryDate = pickupDate.AddDays(delDays);

            VerifyLoadDetails(pickupDate, deliveryDate);
            VerifyLoadCostFTL(truckType);

            VerifyEmailContent(ConfirmationId, pickupDate, false, false, true, truckType);

            string downloadPath;

            if (RunLocal == false)
            {
                downloadPath = downloadPath_Remote;
            }
            else
            {
                downloadPath = downloadPath_LocalUser;
            }

            CheckBOLDocumentFTL(Driver.FindElement(lblConfirmationId).Text, downloadPath);

            if (verifyLoadinShipmentHistory)
            {
                Driver.Click(lblProfile, "Click profile dropdown");
                Driver.Click(lnkProfilePage, "Click 'Profile' to navigate to user profile");
                UserProfilePage profile = new UserProfilePage(Driver, Assert);
                profile.LookupLoadFTL(ConfirmationId, pickupDate, deliveryDate);
            }
        }
예제 #3
0
        public void GetConfirmationLTL(bool checkAllCanadaDocuments = false, bool verifyLoadinShipmentHistory = false, bool isCanada = false, bool hasIns = false, bool isHazMat = false)
        {
            WaitForLoadIndicator();
            Driver.WaitForCondition(d => Driver.IsDisplayed(lblThankYou, "Validate Thank you text"), "Wait for Thank you text to load");
            Driver.WaitForCondition(d => Driver.IsDisplayed(lblConfirmationId, "Check if confirmation number is displayed"), "Wait for confirmation number to load");
            //BOL info
            long ConfirmationId = Convert.ToInt64(Driver.FindElement(lblConfirmationId).Text);
            var  bolId          = (from ld in DataContext.loadPLS20 where ld.load_id == ConfirmationId select ld).SingleOrDefault();

            Assert.AreEqual(ConfirmationId.ToString(), bolId.bol, "Validate BOL in database");

            int      pckDays;
            int      delDays;
            DateTime pickupDate;
            DateTime deliveryDate;

            if (isCanada == false)
            {
                pckDays      = WC.GetWorkingDay(DateTime.Today, InputData.Data.numPickupDays);
                pickupDate   = DateTime.Today.AddDays(pckDays);
                delDays      = WC.GetWorkingDeliveryDay(pickupDate, InputData.Data.numDeliveryDays);
                deliveryDate = pickupDate.AddDays(delDays);

                Assert.AreEqual(InputData.Data.CarrierName, Driver.FindElement(lblCarrierId).Text, "Validate Carrier Information");
            }
            else
            {
                pckDays      = WC.GetWorkingDay(DateTime.Today, InputData.Data.numPickupDaysCAN, isCanada);
                pickupDate   = DateTime.Today.AddDays(pckDays);
                delDays      = WC.GetWorkingDeliveryDay(pickupDate, InputData.Data.numDeliveryDaysCAN, isCanada);
                deliveryDate = pickupDate.AddDays(delDays);

                Assert.AreEqual(InputData.Data.CarrierNameCAN, Driver.FindElement(lblCarrierId).Text, "Validate Carrier Information");
            }

            VerifyLoadDetails(pickupDate, deliveryDate, isCanada);
            VerifyLoadCostLTL(isCanada, hasIns);

            // Item condition / Package Type
            Assert.AreEqual(InputData.Data.selCondition, Driver.FindElement(lblItemCondition).Text, "Validate item condition");
            Assert.AreEqual(InputData.Data.selPackageType, Driver.FindElement(lblPackageType).Text, "Validate item package type");

            VerifyEmailContent(ConfirmationId, pickupDate, isCanada, hasIns);

            string downloadPath;

            if (RunLocal == false)
            {
                downloadPath = downloadPath_Remote;
            }
            else
            {
                downloadPath = downloadPath_LocalUser;
            }

            CheckBOLDocumentLTL(ConfirmationId, downloadPath, isCanada, isHazMat);

            // Currently only handles new user entered vendor and purchaser addresses with a user entered Customs Broker
            if (checkAllCanadaDocuments == true)
            {
                CheckNAFTADocument(ConfirmationId, downloadPath);
                CheckSLIDocument(ConfirmationId, downloadPath);
                CheckPLDocument(ConfirmationId, downloadPath);
                CheckCCIDocument(ConfirmationId, downloadPath);
                CheckCIDocument(ConfirmationId, downloadPath);
            }

            if (verifyLoadinShipmentHistory)
            {
                Driver.Click(lblProfile, "Click profile dropdown");
                Driver.Click(lnkProfilePage, "Click 'Profile' to navigate to user profile");
                UserProfilePage profile = new UserProfilePage(Driver, Assert);
                profile.LookupLoadLTL(ConfirmationId, pickupDate, deliveryDate, isCanada);
            }
        }