private void SelectAdType(WaitListModel Data) { Wait.MLSeconds(200); if (!string.IsNullOrEmpty(Data.AddType)) { Select.ByText(form_AdTypeDD, Data.AddType); } }
private void filterWaitList(WaitListModel Data) { IList <IWebElement> FilterList = DataGrid.FindElement(By.ClassName("ng-table-filters")).FindElements(By.TagName("input")); FilterList[0].Clear(); FilterList[0].SendKeys(Data.MemberId); //if (Data.defaultProduct != null) { // FilterList[8].Clear(); // FilterList[8].SendKeys(Data.defaultProduct); //} Wait.AM_Loaging_ShowAndHide(); }
public WaitListPage FillNewWaitList(WaitListModel Data) { if (Data.MemberId != "") { Select.FromList(Data.MemberId, form_MemberIdField); Wait.UntilLoading(); Wait.MLSeconds(1000); } if (!string.IsNullOrEmpty(Data.ProductGroup)) { Select.ByText(form_ProductgroupDD, Data.ProductGroup); } if (!string.IsNullOrEmpty(Data.AddType)) { Select.ByText(form_AdTypeDD, Data.AddType); } if (!string.IsNullOrEmpty(Data.SearchTerms)) { Select.FromList(Data.SearchTerms, form_SearchTermsField); } if (Data.Position > 0) { Select.ByText(form_PositionDD, Data.Position.ToString()); } if (!string.IsNullOrEmpty(Data.DeliveryPrefrnces)) { Select.ByText(form_DeliveryPrefDD, Data.DeliveryPrefrnces); } if (Data.Cost > 0) { form_CostField.Clear(); form_CostField.SendKeys(Data.Cost.ToString()); } if (!string.IsNullOrEmpty(Data.defaultProduct)) { SelectAdType(Data); Element.ScrolTo(form_DefaultProduct); form_DefaultProduct.Clear(); form_DefaultProduct.SendKeys(Data.defaultProduct); } if (!string.IsNullOrEmpty(Data.SalesRep)) { Select.ByText(form_SaledRepDD, Data.SalesRep); } if (!string.IsNullOrEmpty(Data.Coordinator)) { Select.ByText(form_coordinatorDD, Data.Coordinator); } SelectAdType(Data); return(this); }
public void EditWaitList(WaitListModel Data) { this.filterWaitList(Data); IWebElement aElement = this.GetRowFromFilter(); aElement.Click(); // Wait.UntilDisply(form_ProductgroupDD); Wait.AM_Loaging_ShowAndHide(); if (!string.IsNullOrEmpty(Data.defaultProduct)) { Element.ScrolTo(form_DefaultProduct); form_DefaultProduct.Clear(); form_DefaultProduct.SendKeys(Data.defaultProduct); } SavenewWaitListBtn.Click(); this.VerifyUpdate(); }
public void Notify(WaitListModel Data) { this.filterWaitList(Data); IWebElement aElement = this.GetRowFromFilter(); aElement.FindElement(By.LinkText("Notify")).Click(); Wait.UntilDisply(Notification_SendBtn); Notification_EmailField.Clear(); Notification_EmailField.SendKeys(this.Email); Notification_SendBtn.Click(); IList <string> result = Wait.UntilToastMessageShow(); if (result.Any(e => e == "Message sent successfully")) { Logger.Log(LogingType.TestCasePass, "Wait list Notify Save Successfully"); } else { Logger.Log(LogingType.TextCaseFail, result.ToString()); throw new Exception(result.ToString()); } }