Exemple #1
0
 public bool MyLoadsValidations()
 {
     try
     {
         Assert.IsTrue(VerifyTextClass());
         if (_DashboardData.Entity == Constants.Entity_Carrier)
         {
             MyTasksPage objMyTasksPage = new MyTasksPage(this.testConfig);
             Assert.IsTrue(CheckPickupWeekData());
             objMyTasksPage.Navigate();
             Assert.IsTrue(CheckDeliveryWeekData());
             objMyTasksPage.Navigate();
         }
         else
         {
             Assert.IsTrue(CheckPickupWeekData());
             CLAW objClaw = new CLAW(testConfig, testData);
             objClaw.NavigateTo("HOME");
             Assert.IsTrue(CheckDeliveryWeekData());
             objClaw.NavigateTo("HOME");
         }
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemple #2
0
 public string NavigateToAccounting()
 {
     try
     {
         Assert.IsTrue(_MyTasksPage.Navigate());
         _MyTasksPage.WaitUntilLoading();
         Assert.IsTrue(_MyTasksPage.AccountingTab.WaitUntilDisplayed());
         Assert.IsTrue(_MyTasksPage.AccountingTab.Click());
         Assert.IsTrue(_MyTasksPage.AccountingPanel.WaitUntilDisplayed());
         return("NavigationSuccess");
     }
     catch
     {
         return("NavigationFailed");
     }
 }
Exemple #3
0
        private bool VerifyMyLoadsCount(UIItem item, string count)
        {
            try
            {
                Assert.IsTrue(item.Click());
                _DashboardPage.My_Loads_Search_Results_Headers.WaitUntilDisplayed(30);

                UIItem TotalResults = new UIItem("MyLoads>> Total results>>", byTotalResults, driver);
                UIItem CountResults = new UIItem("MyLoads>> Total results>>", byCountResults, driver);

                if (TotalResults.IsDisplayed())
                {
                    Assert.IsTrue(TotalResults.UIVerify("HasText." + count));
                }
                else
                {
                    Assert.IsTrue(CountResults.UIVerify("HasText." + count));
                }

                if (_entityname == Constants.Entity_Carrier)
                {
                    MyTasksPage objToNavigate = new MyTasksPage(this.testConfig);
                    objToNavigate.Navigate();
                }
                else
                {
                    CLAW objToNavigate = new CLAW(testConfig, testData);
                    objToNavigate.NavigateTo("HOME");
                }

                return(true);
            }
            catch
            {
                return(false);
            }
        }