Пример #1
0
        public string GetPricingDetails()
        {
            try
            {
                Assert.IsTrue(_LoadDetailsPage.WaitUntilLoading());
                Assert.IsTrue(_LoadDetailsPage.ChargesTab.Click());
                Assert.IsTrue(_LoadDetailsPage.ChargersTab_Chargers.WaitUntilDisplayed());

                if (_LoadDetails_Charger.ChargesTable_ChargesCol.ElementByIndex(1).Text.Contains("Flat Rate"))
                {
                    string flatRate = _LoadDetails_Charger.ChargesTable_AmountCol.ElementByIndex(1).Text;
                    flatRate = flatRate.Replace("$", "");
                    flatRate = flatRate.Insert(flatRate.Length, " CAD");
                    _CreateLTLLoadData.FlatRate = flatRate;

                    if (_LoadDetails_Charger.ChargesTable_ChargesCol.ElementByIndex(2).Text.Contains("Fuel Surcharge"))
                    {
                        string fuelSurcharge = _LoadDetails_Charger.ChargesTable_AmountCol.ElementByIndex(2).Text;
                        fuelSurcharge = fuelSurcharge.Replace("$", "");
                        fuelSurcharge = fuelSurcharge.Insert(fuelSurcharge.Length, " CAD");
                        _CreateLTLLoadData.FuelSurcharge = fuelSurcharge;
                    }

                    return("DataCopied");
                }
                else
                {
                    return("Failed");
                }
            }
            catch
            {
                return("Failed");
            }
        }
Пример #2
0
 private bool NavigateTo_TrackingTab()
 {
     try
     {
         if (_LoadDetailsPage.TrackingTab_TrackingNotes.IsDisplayed())
         {
             return(true);
         }
         Assert.IsTrue(_LoadDetailsPage.TrackingTab.WaitUntilDisplayed(10));
         Assert.IsTrue(_LoadDetailsPage.TrackingTab.Click());
         _LoadDetailsPage.WaitUntilLoading();
         Assert.IsTrue(_LoadDetailsPage.TrackingTab_TrackingNotes.WaitUntilDisplayed(10));
         return(true);
     }
     catch
     {
         return(false);
     }
 }