internal void UpdateSearchTerms(PropsalModel Data)
 {
     Wait.UntilDisply(MemberIdField);
     this.AddSearchTerm(Data);
     this.SaveProposalBtn.Click();
     this.VarifyUpdate();
 }
 internal void CreateProposal(PropsalModel Data)
 {
     Wait.UntilDisply(MemberIdField);
     this.AddSearchTerm(Data);
     this.FillProposal(Data);
     this.SaveProposalBtn.Click();
     this.VerifySave();
 }
 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);
 }
Exemplo n.º 4
0
        private void FilterProposal(PropsalModel Data)
        {
            IList <IWebElement> list = FilterRow.FindElements(By.TagName("input"));

            Wait.UntilDisply(FilterRow);
            Element.ClearAllFields(FilterRow.FindElements(By.TagName("input")));
            list[0].SendKeys(Data.MemberId);
            Wait.AM_Loaging_ShowAndHide();
            this.OpenLatestProposal();
        }
        internal void CreateProposalSaveAndAdd(PropsalModel Data)
        {
            Wait.UntilDisply(MemberIdField);
            this.AddSearchTerm(Data);
            this.FillProposal(Data);

            Element.GetPerent(this.SaveProposalBtn).FindElement(By.CssSelector("button[data-toggle='dropdown']")).Click();
            Wait.Second(1);
            driver.FindElement(By.LinkText("Save and Add")).Click();
            this.VerifySave_AndAdd(Data);
        }
        private void VerifySave_AndAdd(PropsalModel Data)
        {
            IList <string> Resultbanner = Wait.UntilToastMessageShow();

            if (Resultbanner.Any(e => e == "Saved and new added successfully"))
            {
                Logger.Log(LogingType.TestCasePass, "New Proposal Save Sucessfully");
            }
            else
            {
                Logger.Log(LogingType.TextCaseFail, "New Proposal Unable to save");
                throw new Exception("New Proposal Unable to save");
            }
        }
 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);
 }
 private void AddSearchTerm(PropsalModel Data)
 {
     this.OpenTermDialog(Data.InventoryType);
     this.FillSerachTerms(Data);
     SearchBtn.Click();
     Wait.UntilLoading(TableRecords);
     Wait.Second(1);
     if (!TermsModal.FindElements(By.CssSelector("tr[data-ng-repeat='inventory in $data']"))[0].FindElement(By.TagName("input")).Enabled)
     {
         Modal.Close();
         throw new Exception(String.Format("Inventory is not available on given search Terms = {0}", Data.SearchTerms[0]));
     }
     else
     {
         TermsModal.FindElements(By.CssSelector("tr[data-ng-repeat='inventory in $data']"))[0].FindElement(By.TagName("input")).Click();
     }
     Wait.MLSeconds(100);
     AdToProposalBtn.Click();
 }
        internal void CreateProposal(PropsalModel Data)
        {
            IWebElement Result = this.GetResultFromSearch(Data.SearchTerms[0]);

            Result.FindElement(By.CssSelector("input[checklist-value='inventory']")).Click();
            Wait.MLSeconds(100);
            CreateProposalBtn.Click();
            Wait.UntilDisply(MemberIdField);
            this.FillProposal(Data);
            this.SaveProposalBtn.Click();
            IList <string> Resultbanner = Wait.UntilToastMessageShow();

            if (Resultbanner.Any(e => e == "Saved successfully"))
            {
                Logger.Log(LogingType.TestCasePass, "New Proposal Save Sucessfully");
            }
            else
            {
                Logger.Log(LogingType.TextCaseFail, "New Proposal Unable to save");
            }
        }
Exemplo n.º 10
0
 internal void OpenProposal(PropsalModel Data)
 {
     FilterProposal(Data);
 }