internal InventoryPage FillSearch(AddManagmentData.Model.InventoryModel inventory) { if (string.IsNullOrEmpty(inventory.InventoryType)) { this.SelectInventoryType(inventory.InventoryType); } if (!string.IsNullOrEmpty(inventory.ProductGroup)) { Select.ByText(Productgroup, inventory.ProductGroup); } if (!string.IsNullOrEmpty(inventory.AdType)) { Select.ByText(AdType, inventory.AdType); } if (!string.IsNullOrEmpty(inventory.Month)) { Select.ByText(Month, inventory.Month); } if (!string.IsNullOrEmpty(inventory.Year.ToString())) { Select.ByText(Year, inventory.Year.ToString()); } if (inventory.SearchTerms.Count > 0) { Wait.MLSeconds(200); Select.ClearTagBasedInput(searchTermsControl); Select.TagBasedInput(inventory.SearchTerms, searchTermsControl); } Element.syncCheckBox(inventory.IncludeSubCat, SubCatagoriesCheckbox); Wait.MLSeconds(100); return(this); }
public void PerformAs(IActor actor) { foreach (var row in _rows) { switch (row.Label.ToUpper()) { case "URL": actor.AttemptsTo(SendKeys.To(SubmissionPage.UrlInputField, row.Value)); break; case "TYPE": actor.AttemptsTo(Select.ByText(SubmissionPage.TypeSelect, row.Value)); break; case "EMAIL": actor.AttemptsTo(SendKeys.To(SubmissionPage.EmailInputField, row.Value)); break; case "DESCRIPTION": actor.AttemptsTo(SendKeys.To(SubmissionPage.DescriptionInputField, row.Value)); break; case "NAME": actor.AttemptsTo(SendKeys.To(SubmissionPage.NameField, row.Value)); break; default: throw new NotImplementedException(); } } }
private void SelectAdType(WaitListModel Data) { Wait.MLSeconds(200); if (!string.IsNullOrEmpty(Data.AddType)) { Select.ByText(form_AdTypeDD, Data.AddType); } }
private void ChageStatusFilter(string b) { IList <IWebElement> filterList = this.GetFilterControlList(); IWebElement SelectEle = filterList[6].FindElement(By.TagName("select")); Select.ByText(SelectEle, b); Wait.AM_Loaging_ShowAndHide(); }
internal Reports AdsBelowRateCard() { Select.ByText(ReportTypeDD, "Ads Below Rate Card"); Wait.Second(1); RunReportBtn.Click(); Wait.AM_Loaging_ShowAndHide(); this.verifyGridResult(); return(this); }
private void FillProposal(PropsalModel Data) { Select.FromList(Data.MemberId, MemberIdField); Wait.Second(2); Select.ByText(ContactDD, Data.Contact); Select.ByText(SalesRepDD, Data.SalesRep); ProposalNameField.Clear(); ProposalNameField.SendKeys(Data.ProposalName); Wait.MLSeconds(100); }
internal void Update(OrderLineModel data) { if (data.Status != null) { Element.ScrolTo(StatusDD); Select.ByText(StatusDD, data.Status); Wait.MLSeconds(100); } this.Save(); }
public Reports DropProductReport(string ProductG, string Adtype) { Select.ByText(ReportTypeDD, "Dropped Product"); Wait.UntilDisply(Productgroup); Select.ByText(Productgroup, ProductG); Select.ByText(AdType, Adtype); Wait.MLSeconds(200); Wait.UntilClickAble(RunReportBtn); RunReportBtn.Click(); Wait.AM_Loaging_ShowAndHide(); this.verifyGridResult(); return(this); }
internal void SetFutureYearFilter() { Select.ByText(FilterYearDD, (DateTime.Now.Year + 1).ToString()); Wait.AM_Loaging_ShowAndHide(); if (OrderResultGridParent.FindElements(By.TagName("tr"))[0].FindElement(By.TagName("input")).Enabled) { Select.ByText(FilterYearDD, DateTime.Now.Year.ToString()); Wait.AM_Loaging_ShowAndHide(); throw new Exception("Check box is Enabled for future year."); } Select.ByText(FilterYearDD, DateTime.Now.Year.ToString()); 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); }
internal Reports DefaultProductReport(string MemberId, string ProductGroup) { Select.ByText(ReportTypeDD, "Default Product Report"); Wait.Second(1); Select.ByText(Productgroup, ProductGroup); Select.FromList(MemberId, MemberIDDD); Wait.MLSeconds(100); RunReportBtn.Click(); Wait.AM_Loaging_ShowAndHide(); Wait.Second(1); Wait.UntilLoading(); this.verifyGridResult(); return(this); }
public AdGroupPage ClearAllfilter() { MemberIdField.Clear(); Select.SelectFromMultipleControl(new List <string>() { "Uncheck All" }, SalesRepControl); Select.SelectFromMultipleControl(new List <string>() { "Uncheck All" }, CoordinatorControl); Select.ByText(YearDD, DateTime.Now.Year.ToString()); return(this); }
internal Reports OrderBySearchTerms(string ProductG, string Adtype, string term) { Select.ByText(ReportTypeDD, "Orders By Search Term"); Wait.UntilDisply(Productgroup); Wait.MLSeconds(500); Select.ByText(Productgroup, ProductG); Wait.MLSeconds(300); Select.ByText(AdType, Adtype); Select.ClearTagBasedInput(searchTermsControl); Select.TagBasedInput(term, searchTermsControl); RunReportBtn.Click(); Wait.AM_Loaging_ShowAndHide(); this.verifyGridResult(); return(this); }
internal Reports InventoryHistoryReport(string ProductGroup, string Searchterms = "") { Select.ByText(ReportTypeDD, "Inventory History Report"); Wait.Second(1); Select.ByText(Productgroup, ProductGroup); //Select.ByText(AdType, Adtype); if (!string.IsNullOrEmpty(Searchterms)) { Select.TagBasedInput(Searchterms, searchTermsControl); } RunReportBtn.Click(); Wait.AM_Loaging_ShowAndHide(); this.verifyGridResult_InventoryHistory(); return(this); }
public SimulateSearchPage SimulateSearch_Page(string Terms, string productGroup) { if (!string.IsNullOrEmpty(Terms)) { CategoryField.Clear(); CategoryField.SendKeys(Terms); } if (!string.IsNullOrEmpty(productGroup)) { Select.ByText(Productgroup, productGroup); } SimulateSearch_SearchBtn.Click(); Wait.AM_Loaging_ShowAndHide(); this.VerifySimulateResult(Terms); return(this); }
private void FillSerachTerms(PropsalModel Data) { Select.ByText(Productgroup, Data.ProductGroup); Wait.MLSeconds(300); Select.ByText(AdType, Data.AdType); if (Data.SearchTerms.Count > 0) { Select.TagBasedInputAboslute(Data.SearchTerms, searchTermsControl); } if (AdType.Text != Data.AdType) { Select.ByText(AdType, Data.AdType); } // Element.syncCheckBox(inventory.IncludeSubCat, SubCatagoriesCheckbox); Wait.MLSeconds(100); }
internal PagesPage FillCratePageForm(PageModel Page) { this.OpenCreatePagePopup(); if (!string.IsNullOrEmpty(Page.Category)) { Select.FromList(Page.Category, CategoryField); } if (!string.IsNullOrEmpty(Page.SubCategory)) { Select.ByText(SubCategorySelect, Page.SubCategory); } Select.ByFreeKeyWords(KeyWordsControl, Page.KeyWordList); this.GeneratePage(); Wait.Second(1); Page.GenratedPageName = PageField.Text; return(this); }
public AdvertisementPage FillSearchParamitters(AdvertisementSearchModel Data) { this.ClearFilter(); FillEMemberID(Data.MemberID); Select.SelectFromMultipleControl(Data.Positions, PositionControl); this.TagBasedInput(Data.SearchTerms, SearchTermsControl); Element.syncCheckBox(Data.IncludeSubCat, IncludeSubCatInput); Select.SelectFromMultipleControl(Data.SalesReps, SalesRepsControl); Select.SelectFromMultipleControl(Data.Statuses, AdStatusControl); Select.ByText(YearDD, Data.Year.ToString()); Select.ByText(MonthDD, Data.Month.ToString()); Select.SelectFromMultipleControl(Data.Rates, RateControl); FilterTextfield.SendKeys(Data.SearchField == null ? "" : Data.SearchField); Select.SelectFromMultipleControl(Data.ProductGroup, ProductGroupControl); Select.SelectFromMultipleControl(Data.AddType, AdTypeControl); this.Search(); return(this); }
internal void TestCall(string Page, string MemnerID, string productGroup, string adtype) { if (!string.IsNullOrEmpty(Page)) { // TestCall_Page.Clear(); //TestCall_Page.SendKeys(Page); Select.FromList(Page, TestCall_Page); } if (!string.IsNullOrEmpty(MemnerID)) { TestCall_MemberID.Clear(); TestCall_MemberID.SendKeys(MemnerID); } Select.ByText(TestCall_Productgroup, productGroup); Select.ByText(TestCall_AdType, adtype); Wait.UntilClickAble(TestCall_SearchBtn); TestCall_SearchBtn.Click(); Wait.AM_Loaging_ShowAndHide(); }
public AdGroupPage FillSearchFilters(string memberID, IList <string> SalesRep, IList <string> Coordinator, string year) { if (memberID != "") { Select.FromList(memberID, MemberIdField); } if (SalesRep != null) { Select.SelectFromMultipleControl(SalesRep, SalesRepControl); } if (Coordinator != null) { Select.SelectFromMultipleControl(Coordinator, CoordinatorControl); } if (year != "" || year != null) { Select.ByText(YearDD, year); } return(this); }
private void FillAddGroupData(AdGroupModel data) { if (!String.IsNullOrEmpty(data.ProductGroup)) { Select.ByText(AdGroupForm_ApplicationDD, data.ProductGroup); Wait.Second(2); } if (!String.IsNullOrEmpty(data.AddType)) { Select.ByText(AdGroupForm_AdTypeDD, data.AddType); Wait.MLSeconds(200); } if (!String.IsNullOrEmpty(data.GroupName)) { this.AdGroupForm_GroupNameField.Clear(); this.AdGroupForm_GroupNameField.SendKeys(data.GroupName); Wait.MLSeconds(200); } if (data.Impression != null) { this.AdGroupForm_ImpressionsField.Clear(); this.AdGroupForm_ImpressionsField.SendKeys(data.Impression.ToString()); Wait.MLSeconds(200); } if (data.Budget != null) { this.AdGroupForm_BudgetField.Clear(); this.AdGroupForm_BudgetField.SendKeys(data.Budget.ToString()); Wait.MLSeconds(200); } if (data.EndDate != null) { this.AdGroupForm_EndDateField.Clear(); this.AdGroupForm_EndDateField.SendKeys(data.EndDate.ToString()); Wait.MLSeconds(200); } }
internal void GoToAppCatagory(string p) { Select.ByText(AppCat, p); GoBtn.Click(); Wait.AM_Loaging_ShowAndHide(); }
public EditOrderLinePage FillOrderLine_Sales(OrderLineModel OrderLineData) { Wait.UntilDisply(PositionDD); Select.ByText(ProductGroupDD, OrderLineData.ProductGroup); Wait.MLSeconds(200); Select.ByText(AddTypeDD, OrderLineData.AddType); Wait.MLSeconds(1000); if (OrderLineData.Position != null && OrderLineData.Position != 0) { Select.ByText(PositionDD, OrderLineData.Position.ToString()); Wait.MLSeconds(200); } if (OrderLineData.SearchTerm != null && OrderLineData.SearchTerm != "") { SelectSearchTerms(OrderLineData.SearchTerm); } if (OrderLineData.EndDate != null) { EndDate.SendKeys(OrderLineData.EndDate.Value.ToString("M/d/yyyy")); } ProductInfoField.Click(); Wait.MLSeconds(200); Select.ByText(DeliveryPrefDD, OrderLineData.DeliveryPreferences); Wait.MLSeconds(100); ProductInfoField.Clear(); ProductInfoField.SendKeys(OrderLineData.ProductInformation); Wait.MLSeconds(100); if (OrderLineData.Impressions != null) { ImpressionsField.Clear(); ImpressionsField.SendKeys(OrderLineData.Impressions.ToString()); Wait.MLSeconds(100); } if (OrderLineData.Cost != null && OrderLineData.Cost != 0.0) { CostField.Clear(); CostField.SendKeys(OrderLineData.Cost.ToString()); Wait.MLSeconds(100); } else { Wait.MLSeconds(300); ProductInfoField.Click(); Wait.MLSeconds(200); } //if (OrderLineData.RateEnable) //{ // RateCheckBox.Click(); // Wait.MLSeconds(200); // RateField.Clear(); // RateField.SendKeys(OrderLineData.Rate.ToString()); //} //if (OrderLineData.GeoTargetEnable) //{ // GeoTaggingEnable.Click(); // Wait.MLSeconds(200); // GeoCountryParent.FindElement(By.LinkText("input")).SendKeys(OrderLineData.Countries); // GeoTargetStatesParent.FindElement(By.TagName("input")).SendKeys(OrderLineData.States); //} //if (!OrderLineData.KeyWordsEnable) //{ // KeyWordCheckBox.Click(); // Wait.MLSeconds(100); //} //if (!OrderLineData.CatogoriesEnable) //{ // IsCatagoryTargetCheckBox.Click(); // Wait.MLSeconds(100); //} //if (!OrderLineData.SubsitutionsAllow) //{ // Element.GetByValueFromList(AllowSubstitutionsRadios, "0").Click(); //} //if (!OrderLineData.DisplayMultipleAddsAllow) //{ // Element.GetByValueFromList(DisplayMultipleAdsRadios, "0").Click(); //} //if (!OrderLineData.SearchLeadingTextAllow) //{ // Element.GetByValueFromList(AllowSearchLeadingTextRadios, "0").Click(); //} //if (OrderLineData.Priority != null) //{ // Select.ByText(PerorityDD, OrderLineData.Priority.ToString()); //} //if (OrderLineData.ImpressionsPerDay != null) //{ // ImpressionsField.SendKeys(OrderLineData.ImpressionsPerDay.ToString()); //} //if (!string.IsNullOrEmpty(OrderLineData.AddGroupName)) //{ // Select.ByText(groupNameDD, OrderLineData.AddGroupName); //} //if (OrderLineData.ProductSelectionManual == false && OrderLineData.ProductSelectionManual != null) //{ // Element.GetByValueFromList(AutoProductSelectionRadio, "1").Click(); //} //else if (OrderLineData.ProductId_ManualSelection != null && OrderLineData.ProductId_ManualSelection.Count > 0) //{ // foreach (var item in OrderLineData.ProductId_ManualSelection) // { // AddProductToOrderLineByID(item); // } //} //if (OrderLineData.Status != null) //{ // Element.ScrolTo(StatusDD); // Select.ByText(StatusDD, OrderLineData.Status); // Wait.MLSeconds(100); //} return(this); }
public EditOrderLinePage FillOrderLine_Admin(OrderLineModel OrderLineData) { Wait.UntilDisply(PositionDD); if (!string.IsNullOrEmpty(OrderLineData.AddGroupName)) { Select.ByText(ProductGroupDD, "ESP Mobile"); Wait.MLSeconds(200); Select.ByText(AddTypeDD, "PFP"); Wait.MLSeconds(1000); } Select.ByText(ProductGroupDD, OrderLineData.ProductGroup); Wait.MLSeconds(200); Select.ByText(AddTypeDD, OrderLineData.AddType); Wait.MLSeconds(1000); if (OrderLineData.Position != null && OrderLineData.Position != 0) { Select.ByText(PositionDD, OrderLineData.Position.ToString()); Wait.MLSeconds(200); } if (OrderLineData.SearchTerm != null && OrderLineData.SearchTerm != "") { SelectSearchTerms(OrderLineData.SearchTerm); } if (OrderLineData.EndDate != null) { EndDate.SendKeys(OrderLineData.EndDate.Value.ToString("M/d/yyyy")); } ProductInfoField.Click(); Wait.MLSeconds(200); Select.ByText(DeliveryPrefDD, OrderLineData.DeliveryPreferences); Wait.MLSeconds(100); ProductInfoField.Clear(); ProductInfoField.SendKeys(OrderLineData.ProductInformation); Wait.MLSeconds(100); if (OrderLineData.Impressions != null) { ImpressionsField.Clear(); ImpressionsField.SendKeys(OrderLineData.Impressions.ToString()); Wait.MLSeconds(100); } if (OrderLineData.Cost != null && OrderLineData.Cost != 0.0) { CostField.Clear(); CostField.SendKeys(OrderLineData.Cost.ToString()); Wait.MLSeconds(100); } else { Wait.MLSeconds(500); try { ProductInfoField.Click(); } catch (Exception) { } Wait.MLSeconds(200); } if (OrderLineData.RateEnable) { RateCheckBox.Click(); Wait.MLSeconds(200); RateField.Clear(); RateField.SendKeys(OrderLineData.Rate.ToString()); } if (OrderLineData.GeoTargetEnable) { GeoTaggingEnable.Click(); Wait.MLSeconds(200); GeoCountryParent.FindElement(By.LinkText("input")).SendKeys(OrderLineData.Countries); GeoTargetStatesParent.FindElement(By.TagName("input")).SendKeys(OrderLineData.States); } if (!OrderLineData.KeyWordsEnable) { KeyWordCheckBox.Click(); Wait.MLSeconds(100); } if (!OrderLineData.CatogoriesEnable) { IsCatagoryTargetCheckBox.Click(); Wait.MLSeconds(100); } if (!OrderLineData.SubsitutionsAllow) { Element.GetByValueFromList(AllowSubstitutionsRadios, "0").Click(); } if (!OrderLineData.DisplayMultipleAddsAllow) { Element.GetByValueFromList(DisplayMultipleAdsRadios, "0").Click(); } if (!OrderLineData.SearchLeadingTextAllow) { Element.GetByValueFromList(AllowSearchLeadingTextRadios, "0").Click(); } if (OrderLineData.Priority != null) { Select.ByText(PerorityDD, OrderLineData.Priority.ToString()); } if (OrderLineData.ImpressionsPerDay != null) { ImpressionsField.SendKeys(OrderLineData.ImpressionsPerDay.ToString()); } if (!string.IsNullOrEmpty(OrderLineData.AddGroupName)) { try { Select.ByText(groupNameDD, OrderLineData.AddGroupName); } catch (Exception ex) { Logger.Log(LogingType.TextCaseFail, ex.ToString()); this.CloseBtn.Click(); Wait.MLSeconds(500); Modal.DirtyclickYes(); Wait.MLSeconds(100); throw new Exception(ex.Message); } } if (OrderLineData.ProductSelectionManual == false && OrderLineData.ProductSelectionManual != null) { Element.ScrolTo(StatusDD); Element.GetByValueFromList(AutoProductSelectionRadio, "1").Click(); Wait.AM_Loaging_ShowAndHide(); } else if (OrderLineData.ProductId_ManualSelection != null && OrderLineData.ProductId_ManualSelection.Count > 0) { foreach (var item in OrderLineData.ProductId_ManualSelection) { AddProductToOrderLineByID(item); } } if (OrderLineData.Status != null) { Element.ScrolTo(StatusDD); Select.ByText(StatusDD, OrderLineData.Status); Wait.MLSeconds(100); } return(this); }