public bool AddedCarrier_UIVerify() { UIItem Lane = new UIItem("Routing Guide>> Lane", byLane, _driver); UIItem CarrierName = new UIItem("Routing Guide>> CarrierName", byCarrierName, _driver); UIItem CarrierEffDateDisplay = new UIItem("Routing Guide>> CarrierEffDate", byCarrierEffDateDisplay, _driver); UIItem CarrierExpDateDisplay = new UIItem("Routing Guide>> CarrierExpDate", byCarrierExpDateDisplay, _driver); try { Assert.IsTrue(Lane.Click()); _RoutingGuidePage.WaitUntilLoading(); Assert.IsTrue(CarrierName.WaitUntilDisplayed()); int index = CarrierEffDateDisplay.GetCountOfElements(); CarrierExpDateDisplay.ScrollToElement(CarrierExpDateDisplay.ElementByIndex(index)); Assert.IsFalse(CarrierEffDateDisplay.IsEditable()); Assert.IsFalse(CarrierExpDateDisplay.IsEditable()); Assert.IsTrue(carrierEffDate == Constants.Ignore ? true : CarrierEffDateDisplay.GetAllUIItems()[index - 1].UIVerify(carrierEffDate)); Assert.IsTrue(carrierExpDate == Constants.Ignore ? true : CarrierExpDateDisplay.GetAllUIItems()[index - 1].UIVerify(carrierExpDate)); return(true); } catch (Exception) { return(false); } }
private bool Fill_AddCarrier() { UIItem CarrierCode = new UIItem("Routing Guide>> Carrier Code", byCarrierCode, _driver); UIItem LineItems = new UIItem("Routing Guide>> LineItems", byLineItems, _driver); UIItem LineItemsUnit = new UIItem("Routing Guide>> LineItemsUnit", byLineItemsUnit, _driver); UIItem TimeAllowed = new UIItem("Routing Guide>> TimeAllowed", byTimeAllowed, _driver); UIItem CarrierEffDate = new UIItem("Routing Guide>> CarrierEffDate", byCarrierEffDate, _driver); UIItem CarrierExpDate = new UIItem("Routing Guide>> CarrierExpDate", byCarrierExpDate, _driver); try { int indexLineItem = LineItems.GetCountOfElements(); int indexCarrier = CarrierEffDate.GetCountOfElements(); Assert.IsTrue(CarrierCode.WaitUntilDisplayed()); if (carrierCode != "!IGNORE!") { Assert.IsTrue(CarrierCode.TypeAndSelect(carrierCode)); Assert.IsTrue(CarrierCode.WaitUntilDisabled()); } Assert.IsTrue(LineItems.ClearAndEditByIndex(lineItems, indexLineItem)); Assert.IsTrue(LineItemsUnit.ClearAndEditByIndex(lineItemsUnit, indexLineItem)); Assert.IsTrue(TimeAllowed.ClearAndEditByIndex(timeAllowed, indexCarrier)); CarrierExpDate.ScrollToElement(CarrierExpDate.ElementByIndex(indexCarrier)); Assert.IsTrue(CarrierExpDate.WaitUntilDisplayed()); Assert.IsTrue(CarrierExpDate.ClearAndEditByIndex(carrierExpDate, indexCarrier)); Assert.IsTrue(CarrierEffDate.ClearAndEditByIndex(carrierEffDate, indexCarrier)); return(true); } catch { return(false); } }
public bool AddCarrier_UIVerify() { UIItem CarrierEffDate = new UIItem("Routing Guide>> CarrierEffDate", byCarrierEffDate, _driver); UIItem CarrierExpDate = new UIItem("Routing Guide>> CarrierExpDate", byCarrierExpDate, _driver); try { int index = CarrierEffDate.GetCountOfElements(); CarrierExpDate.ScrollToElement(CarrierExpDate.ElementByIndex(index)); Assert.IsTrue(carrierEffDate == Constants.Ignore ? true : CarrierEffDate.GetAllUIItems()[index - 1].UIVerify(carrierEffDate)); Assert.IsTrue(carrierExpDate == Constants.Ignore ? true : CarrierExpDate.GetAllUIItems()[index - 1].UIVerify(carrierExpDate)); return(true); } catch { return(false); } }