private bool _StopDetails_Fill(Stop_CreateLoad laststop) { try { if (laststop.DeliveryFacilityRemoveButton.IsDisplayed()) laststop.DeliveryFacilityRemoveButton.Click(); Assert.IsTrue(laststop.DeliveryFacility.TypeAndSelect(_StopData.DeliveryFacility)); Assert.IsTrue(laststop.DeliveryFacility.GetAttribute("title").IndexOf(_StopData.DeliveryFacility) != -1); Assert.IsTrue(laststop.ContactName.ClearAndEdit(_StopData.ContactName)); Assert.IsTrue(laststop.CityCode.ClearAndEdit(_StopData.CityCode)); Assert.IsTrue(laststop.PhoneNumber.ClearAndEdit(_StopData.PhoneNumber)); Assert.IsTrue(laststop.Extension.ClearAndEdit(_StopData.Extension)); Assert.IsTrue(laststop.DeliveryNumber.ClearAndEdit(_StopData.DeliveryNumber)); Assert.IsTrue(laststop.DeliveryAvailable.ClearAndEdit(_StopData.DeliveryAvailable)); Assert.IsTrue(laststop.DeliveryBy.ClearAndEdit(_StopData.DeliveryBy)); Assert.IsTrue(laststop.DeliveryBy.Edit(Keys.Tab)); Assert.IsTrue(laststop.AppointmentStartTime.ClearAndEdit(_StopData.AppointmentStartTime)); Assert.IsTrue(laststop.AppointmentEndTime.ClearAndEdit(_StopData.AppointmentEndTime)); Assert.IsTrue(laststop.AppointmentEndTime.Edit(Keys.Tab)); return true; } catch { return false; } }
public string StopDetails_Fill() { try { Stop_CreateLoad laststop = _CreateLoadPage.Stops.Last(); Assert.IsTrue(_StopDetails_Fill(laststop)); return "StopDetailsFilled"; } catch { return "StopDetailsFailed"; } }
public string Commodity_Add() { try { Stop_CreateLoad laststop = _CreateLoadPage.Stops.Last(); int expectedcommoditycount = laststop.Commodity.Count() + 1; Assert.IsTrue(laststop.AddAnotherCommodity.Click()); Assert.IsTrue(laststop.Commodity.Count() == expectedcommoditycount); return "CommodityAdded"; } catch { return "CommodityAddFailed"; } }