/// <summary>
 /// Desc: Method is used for validate Home Page
 /// Validation Point : CCS Dashboard Filter Icon
 /// </summary>
 /// <param name="testData"></param>
 public void HomePage_FilterIcon(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(100);
         row = getElements("xpath", "//div[contains(@class,'k-grid-aria-root')]//descendant::tr/th"); // Filter Icon List
         IList <IWebElement> list = getElements("xpath", "//*[@class='k-grid-header-wrap']//descendant::tr/th//span[contains(@class,'k-icon k-i-filter')]");
         int size = row.Count;
         var flag = 0;
         for (int i = 0; i <= size; i++)
         {
             string HaderName = testData["Dashboard_PageFilterIcon"];
             if (HaderName.Equals(row.ElementAt(i).Text))
             {
                 ExtentTestManager._parentTest.Log(Status.Pass, "Web Element is visible hence Expected condition is met : " + HaderName);
                 flag = flag + 1;
                 list.ElementAt(i).Click();
                 ExtentTestManager._parentTest.Log(Status.Pass, "Web Element is visible hence Expected condition is met Automation clicked  : " + HaderName + " Filter Icon");
                 SendKeysForElement("xpath", "//kendo-grid-string-filter-menu-input[1]/kendo-grid-filter-menu-input-wrapper/input", testData["Dashboard_filterIteamName"], "Test Data passed");
                 ClickOnElementWhenElementFound("xpath", "//*[@class='k-button k-primary']", "Click on Filter button");
                 break;
             }
             else if (HaderName.Equals(row.ElementAt(i).Text))
             {
                 ExtentTestManager._parentTest.Log(Status.Pass, "Web Element is visible hence Expected condition is met : " + HaderName);
                 flag = flag + 1;
                 list.ElementAt(i).Click();
                 ExtentTestManager._parentTest.Log(Status.Pass, "Web Element is visible hence Expected condition is met Automation clicked  : " + HaderName + " Filter Icon");
                 SendKeysForElement("xpath", "//kendo-grid-string-filter-menu-input[1]/kendo-grid-filter-menu-input-wrapper/input", testData["Dashboard_filterIteamName"], "Test Data passed");
                 ClickOnElementWhenElementFound("xpath", "//*[@class='k-button k-primary']", "Click on Filter button");
                 break;
             }
             else if (HaderName.Equals(row.ElementAt(i).Text))
             {
                 ExtentTestManager._parentTest.Log(Status.Pass, "Web Element is visible hence Expected condition is met : " + HaderName);
                 flag = flag + 1;
                 list.ElementAt(i).Click();
                 ExtentTestManager._parentTest.Log(Status.Pass, "Web Element is visible hence Expected condition is met Automation clicked  : " + HaderName + " Filter Icon");
                 SendKeysForElement("xpath", "//kendo-grid-string-filter-menu-input[1]/kendo-grid-filter-menu-input-wrapper/input", testData["Dashboard_filterIteamName"], "Test Data passed");
                 ClickOnElementWhenElementFound("xpath", "//*[@class='k-button k-primary']", "Click on Filter button");
                 break;
             }
             else if (HaderName.Equals(row.ElementAt(i).Text))
             {
                 ExtentTestManager._parentTest.Log(Status.Pass, "Web Element is visible hence Expected condition is met : " + HaderName);
                 flag = flag + 1;
                 list.ElementAt(i).Click();
                 ExtentTestManager._parentTest.Log(Status.Pass, "Web Element is visible hence Expected condition is met Automation clicked  : " + HaderName + " Filter Icon");
                 SendKeysForElement("xpath", "//kendo-grid-string-filter-menu-input[1]/kendo-grid-filter-menu-input-wrapper/input", testData["Dashboard_filterIteamName"], "Test Data passed");
                 ClickOnElementWhenElementFound("xpath", "//*[@class='k-button k-primary']", "Click on Filter button");
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         Assert.Fail(ex.Message);
     }
 }
Example #2
0
 /// <summary>
 /// Desc: Method validate Bulk change Grid
 /// </summary>
 /// <param name="testData"></param>
 public void BulkchangeGrid(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElementbool(20, 250, "//kendo-dropdownlist[contains(@name,'mt')]//span[contains(@class,'k-input')]");
         var         kendoElement_Action = getElement("xpath", "//kendo-dropdownlist[@name='a']//span[contains(@class,'k-i-arrow-s k-icon')]");
         IWebElement currentItem_Action  = kendoElement_Action.FindElement(By.XPath("//*[contains(@name,'a')]//*[contains(@class,'k-dropdown-wrap k-state-default')]"));
         while (currentItem_Action.Text != testData["Dropdown_Action"])
         {
             currentItem_Action.SendKeys(Keys.ArrowDown); ExtentTestManager._parentTest.Log(Status.Pass, "Expected Contract Type Matched " + testData["Dropdown_ContractType"] + " Automation selected the data ");
         }
         var         kendoElement_ObligationMT = getElement("xpath", "//kendo-dropdownlist[@name='mt']//span[contains(@class,'k-i-arrow-s k-icon')]");
         IWebElement currentItem_ObligationMT  = kendoElement_ObligationMT.FindElement(By.XPath("//*[contains(@name,'mt')]//*[contains(@class,'k-dropdown-wrap k-state-default')]"));
         while (currentItem_ObligationMT.Text != testData["Dropdown_ObligationMT"])
         {
             currentItem_ObligationMT.SendKeys(Keys.ArrowDown); ExtentTestManager._parentTest.Log(Status.Pass, "Expected Contract Type Matched " + testData["Dropdown_ContractType"] + " Automation selected the data ");
         }                                                                                                                                                                                                                //Obligation Management Type
         WaitforElement_Visibility(20, 250, "//button[contains(@class,'btn btn-dark')]");
         WaitforElement_ExpectedConditions(20, 250, "//button[contains(@class,'btn btn-dark')]");
         ClickOnElementWhenElementFound("xpath", "//button[contains(@class,'btn btn-dark')]", "Search button");
         PDFandExcelIcon_Bulk(testData);
         PageSort(testData, "xpath", "//*[contains(@class,'k-grid-content k-virtual-content')]//descendant::tr/td[1]", "xpath", "//*[contains(@class,'k-grid-header-wrap')]//descendant::tr/th[2]//a[@class='k-link ng-star-inserted']");
         WaitforElementbool(20, 250, "//span[contains(@class,'k-icon k-i-seek-w')]");
         Pagination(testData, "xpath", "//*[contains(@class,'ng-star-inserted')]//descendant::ul/li");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method validate Grid of change Request
 /// </summary>
 /// <param name="testData"></param>
 public void HaderforChangeRequest(Dictionary <string, string> testData)
 {
     try
     {
         PdfandExcelIconforChangeRequest(testData);
         string HaderName = getElement("xpath", "//div[contains(@class,'titleLeft')]").Text;
         if (HaderName.Contains("Change Request Log"))
         {
             ExtentTestManager._parentTest.Log(Status.Pass, "Expected matched with actual - " + HaderName);
             row = getElements("xpath", "//*[@class='k-grid-header-wrap']//descendant::tr/th//a[contains(@class,'k-link ng-star-inserted')]");
             int size = row.Count;
             for (int i = 1; i <= size; i++)
             {
                 string[] HaderNames = { "Contract", "Request ID", "Lead CCM", "Request Category", "Request Type", "Status", "Request Date", "Target Date" };
                 string   HeaderName = HaderNames[i - 1];
                 AssertAreEqual("xpath", "//*[@class='k-grid-header-wrap']//descendant::tr/th[" + i + "]//a[contains(@class,'k-link ng-star-inserted')]", HeaderName);
             }
         }
         else
         {
             ExtentTestManager._parentTest.Log(Status.Fail, "Expected not  matched with actual  :  " + HaderName);
             GeneralMethod.ScreenShotCapture();
         }
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method validate Obligation Filters
 /// </summary>
 /// <param name="testData"></param>
 public void SearchPage_ObligationFilters(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElement_ExpectedConditions(30, 250, "//kendo-panelbar-item[@id='k-panelbar-1-item-default-3']");
         WaitforElement_Exists(30, 250, "//kendo-panelbar-item[@id='k-panelbar-1-item-default-3']");
         AssertIsTrue("xpath", "//kendo-panelbar-item[@id='k-panelbar-1-item-default-3']", "Obligation Filters");
         WaitforElement_ExpectedConditions(30, 250, "//div[contains(text(),'Functional Group')]");
         TodaysDate = DateTime.Now;
         string TodaysDate_effectiveDate     = Convert.ToString(TodaysDate);
         string TodaysDate_effectiveDateMain = Convert.ToDateTime(TodaysDate_effectiveDate).ToString("MM/dd/yyyy");
         string effectivedate = TodaysDate_effectiveDateMain.Replace("/", "");
         ClearValueOnElementWhenElementFound("xpath", "//kendo-datepicker[contains(@name,'dueDateUpto')]//input[contains(@class,'k-input')]", "Effective Date value cleared");
         SendKeysForElement("xpath", "//kendo-datepicker[contains(@name,'dueDateUpto')]//input[contains(@class,'k-input')]", effectivedate, "Effective Date");
         WaitforElement_ExpectedConditions(30, 250, "//button[@class='btn btn-dark']"); threadWait(900);
         ClickOnElementWhenElementFound("xpath", "//button[@class='btn btn-dark']", "Search Button");
         WaitforElement_ExpectedConditions(30, 250, "//div[@class='ulx-panel-header ng-star-inserted']");
         WaitforElementbool(20, 250, "//*[contains(@class,'k-grid-header-wrap')]//descendant::tr/th[2]//a[contains(@class,'k-link ng-star-inserted')]");
         PageSort(testData, "xpath", "//*[contains(@class,'k-grid-content k-virtual-content')]//descendant::tr/td[2]//span", "xpath", "//*[contains(@class,'k-grid-header-wrap')]//descendant::tr/th[2]//a[contains(@class,'k-link ng-star-inserted')]");
         Pagination(testData, "xpath", "//*[contains(@class,'k-widget k-grid')]//descendant::ul/li");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method is used for validate Home Page
 /// Validation Point : CCS Dashboard Grid
 /// >> Filter>>Label Name
 /// </summary>
 /// <param name="testData"></param>
 public void HomePage_CCSDashboard(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(100);
         AssertAreEqual(JsonTocode_LT("LocatorTypes_value", "HyperReflabel_CCSDashboard"), JsonTocode_LV("LocatorValues_value", "HyperReflabel_CCSDashboard"), testData["HyperReflabel_CCSDashboard"]);
         AssertAreEqual(JsonTocode_LT("LocatorTypes_value", "HyperReflabel_OMSDashboard"), JsonTocode_LV("LocatorValues_value", "HyperReflabel_OMSDashboard"), testData["HyperReflabel_OMSDashboard"]);
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method is used for Read all Excel data to json file[Locators] AND Data Setup will Update the Excel sheet[TestData].
 /// Method start from created new case
 /// Data Setup : Update TestData Sheet.
 /// Json Read Excel File : Locators
 /// </summary>
 /// <param name="testData"></param>
 /// <param name="CaseName">Column For Openacasename Column </param>
 public void TDupdation_AzureADLogin(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(100);
         ReadExistingExcel();         // to update test data excel file.
         JsonFunctionLibray_Reader(); // to read all excel data to json file.
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method validate Add Change Request
 /// Validation point >> column sorting >> Pagination
 /// </summary>
 /// <param name="testData"></param>
 public void AddChangeRequest(Dictionary <string, string> testData)
 {
     try
     {
         ClickOnElementWhenElementFound("xpath", "//a[contains(text(),'Add Change Request')]", "Add Change Request");
         WaitforElementbool(20, 250, "//div[contains(@class,'titleLeft')]");
         WaitforElement_Exists(20, 250, "//button[contains(@class,'btn btn-outline-dark')]");
         AssertAreEqual("xpath", "//div[contains(@class,'titleLeft')]", "Add Change Request");
         AssertAreEqual("xpath", "//div[contains(text(),'Upload Reference Document')]", "Upload Reference Document");
         AssertAreEqual("xpath", "//div[contains(text(),'Additional Information')]", "Additional Information");
         AssertIsTrue("xpath", "//button[contains(@class,'btn btn-dark')]", "Add Request"); threadWait(1900);
         WaitforElement_ExpectedConditions(20, 250, "//a[contains(text(),'Change Request Log')]");
         WaitforElement_Exists(10, 250, "//a[contains(text(),'Change Request Log')]");
         var         kendoElement_RequestCategory = getElement("xpath", "//kendo-dropdownlist[contains(@name,'requestCategory')]//span[contains(@class,'k-i-arrow-s k-icon')]");
         IWebElement currentItem_RequestCategory  = kendoElement_RequestCategory.FindElement(By.XPath("//*[contains(@name,'requestCategory')]//*[contains(@class,'k-dropdown-wrap k-state-default')]"));
         while (currentItem_RequestCategory.Text != testData["Dropdown_RequestCategory"])
         {
             currentItem_RequestCategory.SendKeys(Keys.ArrowDown);
             ExtentTestManager._parentTest.Log(Status.Pass, "Expected Account Name Matched " + testData["Dropdown_RequestCategory"] + " Automation selected the data ");
         }// Request Category
         WaitforElement_ExpectedConditions(20, 250, "//div[@class='col-sm col-sm-3 key required ng-star-inserted']");
         var         kendoElement_RequestType = getElement("xpath", "//kendo-dropdownlist[contains(@name,'requestType')]//span[contains(@class,'k-i-arrow-s k-icon')]");
         IWebElement currentItem_RequestType  = kendoElement_RequestType.FindElement(By.XPath("//*[contains(@name,'requestType')]//*[contains(@class,'k-dropdown-wrap k-state-default')]"));
         while (currentItem_RequestType.Text != testData["Dropdown_RequestType"])
         {
             currentItem_RequestCategory.SendKeys(Keys.ArrowDown);
             ExtentTestManager._parentTest.Log(Status.Pass, "Expected Account Name Matched " + testData["Dropdown_RequestType"] + " Automation selected the data ");
         }//Request Type
         WaitforElement_ExpectedConditions(20, 250, "//div[contains(text(),'Contract')]");
         var         kendoElement_contract = getElement("xpath", "//kendo-dropdownlist[contains(@name,'account')]//span[contains(@class,'k-i-arrow-s k-icon')]");
         IWebElement currentItem_contract  = kendoElement_contract.FindElement(By.XPath("//*[contains(@name,'account')]//*[contains(@class,'k-dropdown-wrap k-state-default')]"));
         while (currentItem_contract.Text != testData["Dropdown_contract"])
         {
             currentItem_RequestCategory.SendKeys(Keys.ArrowDown);
             ExtentTestManager._parentTest.Log(Status.Pass, "Expected Account Name Matched " + testData["Dropdown_contract"] + " Automation selected the data ");
         }//contract
         SendKeysForElement("xpath", "//input[contains(@placeholder,'Enter Subject Of Email here...')]", testData["EmailSubjectCR"], "Subject of Email");
         SendKeysForElement("xpath", "//textarea[contains(@placeholder,'Enter Details here...')]", testData["DetailsCR"], "Details");
         SendKeysForElement("xpath", "//input[contains(@placeholder,'Enter Reason here...')]", testData["ReasonCR"], "Reason");
         ClickOnElementWhenElementFound("xpath", "//button[contains(text(),'Add Request')]", "Add Request");
         WaitforElement(10, 250, "//*[@class='ulx-notification-title']");
         PdfandExcelIconforChangeRequest(testData);
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 public void PDFandExcelIcon(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElementbool(50, 250, "//button[contains(@class,'k-button-icon k-button k-grid-pdf')]");
         AssertIsTrue("xpath", "//button[contains(@class,'k-button-icon k-button k-grid-excel')]", "Excel Element Icon is visible");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method is used to validate user has logined with valid credential
 /// </summary>
 /// <param name="testData"></param>
 public void Credentail_Verfiy(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(100);
         WaitforElementbool(40, 250, "//a[@id='navUserDropDown']");
         AssertAreEqual(JsonTocode_LT("LocatorTypes_value", "Label_UserName_Nav"), JsonTocode_LV("LocatorValues_value", "Label_UserName_Nav"), testData["UserName_HomePage"]);
         GeneralMethod.ScreenShotCapture();
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method validate Page navigate to change Request
 /// </summary>
 /// <param name="testData"></param>
 public void ChangeRequestPage(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElement_ExpectedConditions(30, 250, "//*[contains(text(),'Change Request')]");
         WaitforElement_Exists(30, 250, "//*[contains(text(),'Change Request')]");
         AssertIsTrue("xpath", "//*[contains(text(),'Change Request')]", "Change Request"); threadWait(1200);
         ClickOnElementWhenElementFound("xpath", "//*[contains(text(),'Change Request')]", "Change Request");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method is used for Application Login for CCM User
 /// </summary>
 /// <param name="testData"></param>
 public void CCM_UserLogin(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(100);
         AssertIsTrue(JsonTocode_LT("LocatorTypes_value", "txt_Email"), JsonTocode_LV("LocatorValues_value", "txt_Email"), "User Name");
         SendKeysForElement(JsonTocode_LT("LocatorTypes_value", "txt_Email"), JsonTocode_LV("LocatorValues_value", "txt_Email"), testData["Username"], "User Name");
         AssertIsTrue(JsonTocode_LT("LocatorTypes_value", "txt_Password"), JsonTocode_LV("LocatorValues_value", "txt_Password"), "Password");
         SendKeysForAElement(JsonTocode_LT("LocatorTypes_value", "txt_Password"), JsonTocode_LV("LocatorValues_value", "txt_Password"), testData["Password"], "Password");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         Assert.Fail(ex.Message);
     }
 }
Example #12
0
 /// <summary>
 /// Desc: Method validate Bulk change Grid
 /// </summary>
 /// <param name="testData"></param>
 public void UploadandAddtional(Dictionary <string, string> testData)
 {
     try
     {
         AssertAreEqual("xpath", "//div[contains(text(),'Upload Evidence')]", "Upload Evidence");
         AssertAreEqual("xpath", "//div[contains(text(),'Additional Information')]", "Additional Information");
         AssertIsTrue("xpath", "//button[contains(@class,'btn btn-dark ng-star-inserted')]", "Complete Obligations");
         AssertIsTrue("xpath", "//button[contains(@class,'btn btn-outline-dark')]", "Reset");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
Example #13
0
 /// <summary>
 /// Desc: Method validate Bulk change Icon
 /// </summary>
 /// <param name="testData"></param>
 public void BulkChangePage(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElement_ExpectedConditions(20, 250, "//a[contains(text(),'Bulk Change')]");
         AssertIsTrue("xpath", "//a[contains(text(),'Bulk Change')]", "Bulk Change Nav hader");
         ClickOnElementWhenElementFound("xpath", "//a[contains(text(),'Bulk Change')]", "Bulk Change Nav hader");
         WaitforElement_ExpectedConditions(20, 250, "//span[contains(text(),'--Select an Action--')]");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method is used for validate PDF Icon
 /// </summary>
 /// <param name="testData"></param>
 public void Sorting(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(40);
         WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(50));
         wait.PollingInterval = TimeSpan.FromMilliseconds(250);
         wait.IgnoreExceptionTypes(typeof(NoSuchElementException), typeof(ElementNotVisibleException));
         wait.Until(WaitforIcon());
         PageSort(testData, "xpath", "//*[contains(@class,'k-grid-content k-virtual-content')]//descendant::tr/td[1]//span", "xpath", "//*[contains(@class,'k-grid-header-wrap')]//descendant::tr/th[1]//a[@class='k-link']");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method is used for validate PDF Icon
 /// </summary>
 /// <param name="testData"></param>
 public void PdfIconinGrid(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(40);
         WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(50));
         wait.PollingInterval = TimeSpan.FromMilliseconds(250);
         wait.IgnoreExceptionTypes(typeof(NoSuchElementException), typeof(ElementNotVisibleException));
         wait.Until(WaitforIcon());
         AssertIsTrue("xpath", "//button[contains(@class,'k-button-icon k-button k-grid-excel')]", "Excel Element Icon is visible");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method is used for Application Login for Azure AD user
 /// </summary>
 /// <param name="testData"></param>
 public void AzureADLogin(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(100);
         WaitforElementbool(40, 250, "//h3[contains(text(),'External Login')]");
         ClickOnElementWhenElementFound(JsonTocode_LT("LocatorTypes_value", "Label_Externalheader"), JsonTocode_LV("LocatorValues_value", "Label_Externalheader"), "External Login UlxAzureAD button");
         AssertAreEqual(JsonTocode_LT("LocatorTypes_value", "Label_Externalheader"), JsonTocode_LV("LocatorValues_value", "Label_Externalheader"), testData["LabelValidation_ExternalLogin"]);
         AssertIsTrue(JsonTocode_LT("LocatorTypes_value", "Btn_ExternalLoginUlxAzureAD"), JsonTocode_LV("LocatorValues_value", "Btn_ExternalLoginUlxAzureAD"), "External Login UlxAzureAD button");
         ClickOnElementWhenElementFound(JsonTocode_LT("LocatorTypes_value", "Btn_ExternalLoginUlxAzureAD"), JsonTocode_LV("LocatorValues_value", "Btn_ExternalLoginUlxAzureAD"), "External Login UlxAzureAD button");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         Assert.Fail(ex.Message);
     }
 }
Example #17
0
 /// <summary>
 /// Desc: Method validate Page navigate to Contracts
 /// </summary>
 /// <param name="testData"></param>
 public void ReportPage(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElement_ExpectedConditions(30, 250, "//*[contains(@id,'navComponentDropDown3e')]");
         WaitforElement_Exists(30, 250, "//*[contains(@id,'navComponentDropDown3e')]");
         ClickOnElementWhenElementFound("xpath", "//*[contains(@id,'navComponentDropDown3e')]", "Report Nav Button");
         ElementWaitTime(4);
         ClickOnElementWhenElementFound("xpath", "//a[contains(text(),'Report Template')]", "Report Template Nav drop Down");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 //
 public void StandardReportGrid(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElementbool(20, 250, "//div[@class='ulx-panel-header ng-star-inserted']");
         string HaderName = "Select a Contract or Obligation Report";
         AssertAreEqual("xpath", "//div[@class='ulx-panel-header ng-star-inserted']", HaderName);
         AssertIsTrue("xpath", "//div[contains(text(),'Contract Report')]", "Contract Report");
         AssertIsTrue("xpath", "//*[@class='d-flex align-items-stretch ulx-panel-contents']//div[contains(text(),'Obligation Report')]", "Obligation Reports");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method validate Page navigate to Contracts
 /// </summary>
 /// <param name="testData"></param>
 public void StandardReportPage(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(10);
         AssertIsTrue("id", "navComponentDropDown3", "Report Nav Button");
         ClickOnElementWhenElementFound("id", "navComponentDropDown3", "Report Nav Button");
         WaitforElement(50, 250, "//a[contains(text(),'Standard')]");
         AssertIsTrue("xpath", "//a[contains(text(),'Standard')]", "Standard Nav drop Down");
         ClickOnElementWhenElementFound("xpath", "//a[contains(text(),'Standard')]", "Standard Nav drop Down");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method validate change Request TAT window and Open Change Request Window
 /// Validation point >> column sorting >> Pagination
 /// </summary>
 /// <param name="testData"></param>
 public void OtherWindowChangeRequest(Dictionary <string, string> testData)
 {
     try
     {
         AssertAreEqual("xpath", "//div[contains(text(),'Change Request TAT')]", "Change Request TAT");
         AssertAreEqual("xpath", "//div[contains(text(),'Open Change Request')]", "Open Change Request");
         AssertIsTrue("xpath", "//a[contains(text(),'Add Change Request')]", "Add Change Request");
         PageSort(testData, "xpath", "//*[contains(@class,'k-grid-content k-virtual-content')]//descendant::tr/td[2]", "xpath", "//*[contains(@class,'k-grid-header-wrap')]//descendant::tr/th[2]//a[@class='k-link ng-star-inserted']");
         WaitforElementbool(20, 250, "//span[contains(@class,'k-icon k-i-seek-w')]");
         Pagination(testData, "xpath", "//*[contains(@class,'ng-star-inserted')]//descendant::ul/li");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method validate Page navigate to Search Obligation Page
 /// </summary>
 /// <param name="testData"></param>
 public void SearchPage_Obligation(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElement_ExpectedConditions(30, 250, "//a[@id='navComponentDropDown5']");
         WaitforElement_Exists(30, 250, "//a[@id='navComponentDropDown5']");
         AssertIsTrue("xpath", "//a[@id='navComponentDropDown5']", "Search Nav Button");
         ClickOnElementWhenElementFound("xpath", "//a[@id='navComponentDropDown5']", "Search Nav Button");
         WaitforElement(50, 250, "//a[@class='dropdown-item'][contains(text(),'Obligation')]");
         AssertIsTrue("xpath", "//a[@class='dropdown-item'][contains(text(),'Obligation')]", "Obligation Search Nav Button");
         ClickOnElementWhenElementFound("xpath", "//a[@class='dropdown-item'][contains(text(),'Obligation')]", "Obligation Search Nav Button");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 /// <summary>
 /// Desc: Method is used for Navigate to Contracts
 /// </summary>
 /// <param name="testData"></param>
 public void NavigationContracts(Dictionary <string, string> testData)
 {
     try
     {
         ElementWaitTime(4);
         AssertAreEqual(JsonTocode_LT("LocatorTypes_value", "Nav_Contracts"), JsonTocode_LV("LocatorValues_value", "Nav_Contracts"), testData["Nav_Contracts"]);
         WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(50));
         wait.PollingInterval = TimeSpan.FromMilliseconds(250);
         wait.IgnoreExceptionTypes(typeof(NoSuchElementException), typeof(ElementNotVisibleException));
         IWebElement Contratsbtn = wait.Until(waitforElement());
         threadWait(1200);
         Contratsbtn.Click();
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         Assert.Fail(ex.Message);
     }
 }
        //public DateTime TodaysDate;
        //public DateTime FivedaysDate;


        /// <summary>
        /// Desc: Method validate Page navigate to Archive Page
        /// </summary>
        /// <param name="testData"></param>
        public void ArchivePage(Dictionary <string, string> testData)
        {
            try
            {
                WaitforElement_ExpectedConditions(20, 250, "//a[contains(text(),'Archived Contracts')]");
                AssertIsTrue("xpath", "//a[contains(text(),'Archived Contracts')]", "Archived contract Nav hader");
                ClickOnElementWhenElementFound("xpath", "//a[contains(text(),'Archived Contracts')]", "Obligation Nav Hader");
                PDFandExcelIcon_Archive(testData);
                PageSort(testData, "xpath", "//*[contains(@class,'k-grid-content k-virtual-content')]//descendant::tr/td[1]", "xpath", "//*[contains(@class,'k-grid-header-wrap')]//descendant::tr/th[1]//a[@class='k-link ng-star-inserted']");
                WaitforElementbool(20, 250, "//span[contains(@class,'k-icon k-i-seek-w')]");
                Pagination(testData, "xpath", "//*[contains(@class,'ng-star-inserted')]//descendant::ul/li");
            }
            catch (Exception ex)
            {
                GeneralMethod.ScreenShotCapture();
                ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
                Assert.Fail(ex.Message);
            }
        }
Example #24
0
 /// <summary>
 /// Desc: Method validate Page navigate to Obligation
 /// </summary>
 /// <param name="testData"></param>
 public void ObligationPage(Dictionary <string, string> testData)
 {
     try
     {
         PageLoadWait(100);
         AssertIsTrue("xpath", "//a[contains(text(),'Obligations')]", "Obligation Nav hader");
         ClickOnElementWhenElementFound("xpath", "//a[contains(text(),'Obligations')]", "Obligation Nav Hader");
         PDFandExcelIcon(testData);
         AssertAreEqual("xpath", "//a[contains(text(),'Alerted Obligations')]", "Alerted Obligations");
         AssertAreEqual("xpath", "//a[contains(text(),'Reported Obligations')]", "Reported Obligations");
         AssertAreEqual("xpath", "//a[contains(text(),'Triggered Obligations')]", "Triggered Obligations");
         AssertAreEqual("xpath", "//a[contains(text(),'Checklist')]", "Checklist");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
Example #25
0
 /// <summary>
 /// Desc: Method validate validate the Search user grid and enter the rqueried for the same.
 /// </summary>
 /// <param name="testData"></param>
 public void SearchwithName(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElement_ExpectedConditions(30, 250, "//button[@class='btn btn-dark']");
         SendKeysForElement("xpath", "//input[@name='firstName']", testData["firstName_Search"], "First Name");
         SendKeysForElement("xpath", "//input[@name='lastName']", testData["lastName_Search"], "Last Name");
         SendKeysForElement("xpath", "//input[@name='email']", testData["EmailID_Search"], "Email ID"); threadWait(900);
         WaitforElement_ExpectedConditions(30, 250, "//button[text()='Search']");
         ClickOnElementWhenElementFound("xpath", "//button[text()='Search']", "Search Button");
         AssertIsTrue("xpath", "//button[@class='btn btn-outline-dark']", "Reset Button");
         WaitforElementbool(20, 250, "//div[@class='ulx-panel-header ng-star-inserted']");
         Pagination(testData, "xpath", "//*[contains(@class,'k-widget k-grid')]//descendant::ul/li");
         ClickOnElementWhenElementFound("xpath", "//button[@class='btn btn-outline-dark']", "Reset Button");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
 //
 public void CustomReportGrid(Dictionary <string, string> testData)
 {
     try
     {
         WaitforElementbool(20, 250, "//div[@class='col-sm col-sm-3 key']");
         AssertIsTrue("xpath", "//div[@class='col-sm col-sm-3 key']", "Report Type");
         WaitforElement_ExpectedConditions(20, 250, "//span[contains(@class,'k-i-arrow-s k-icon')]");
         var         kendoElement_ReportType = getElement("xpath", "//span[contains(@class,'k-i-arrow-s k-icon')]");
         IWebElement currentItem_ReportType  = kendoElement_ReportType.FindElement(By.XPath("//*[contains(@class,'k-dropdown-wrap k-state-default')]"));
         while (currentItem_ReportType.Text != testData["Dropdown_ReportType"])
         {
             currentItem_ReportType.SendKeys(Keys.ArrowDown);
             ExtentTestManager._parentTest.Log(Status.Pass, "Expected Account Name Matched " + testData["Dropdown_ReportType"] + " Automation selected the data ");
         }// Report Type
         WaitforElement_ExpectedConditions(20, 250, "//button[contains(text(),'Save As Report Template')]"); threadWait(900);
         WaitforElementbool(20, 250, "//button[@class='btn btn-dark ng-star-inserted']");
     }
     catch (Exception ex)
     {
         GeneralMethod.ScreenShotCapture();
         ExtentTestManager._parentTest.Log(Status.Fail, "Expected not matched " + ex.Message);
         Assert.Fail(ex.Message);
     }
 }
Example #27
0
        /// <summary>
        /// Desc:Method is used to read excel sheets and execute the keywords accordingly
        /// </summary>
        /// <param name="testUnderExecution"></param>
        /// <param name="xls"></param>
        /// <param name="testData"></param>
        public void executeKeywords(string testUnderExecution, ExcelReader xls, Dictionary <string, string> testData)
        {
            //  LexBaseLibrary Object.

            ApplicationLogin_FunctionLibrary Appobj              = new ApplicationLogin_FunctionLibrary();
            HomePage_FunctionLibrary         homePageobj         = new HomePage_FunctionLibrary();
            Contracts_FunctionLibrary        contractsobj        = new Contracts_FunctionLibrary();
            Obligation_FunctionLibrary       Obligationobj       = new Obligation_FunctionLibrary();
            StandardReports_FunctionLibrary  StandardReportsObj  = new StandardReports_FunctionLibrary();
            Custom_FunctionLibrary           CustomReportsObj    = new Custom_FunctionLibrary();
            ReportTemplate_FunctionLibrary   ReprtsTemplateObj   = new ReportTemplate_FunctionLibrary();
            ChangeRequest_FunctionLibrary    ChangeRequetsObj    = new ChangeRequest_FunctionLibrary();
            ObligationSearch_FunctionLibrary ObligationSearchObj = new ObligationSearch_FunctionLibrary();
            UserSearch_FunctionLibrary       USerSearchObj       = new UserSearch_FunctionLibrary();
            Archive_FunctionLibrary          ArchiveObj          = new Archive_FunctionLibrary();
            BulkChange_FunctionLibrary       bulkChangeObj       = new BulkChange_FunctionLibrary();

            string KeywordsSheet = Enum.Sheets.EnvShakeout.ToString();
            int    rows          = xls.getRowCount(KeywordsSheet);

            for (int rNum = 2; rNum <= rows; rNum++)
            {
                string tcid = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.TC_Id.ToString(), rNum);
                if (tcid.Equals(testUnderExecution))
                {
                    string data        = null;
                    string keyword     = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.Keyword.ToString(), rNum);
                    string locatorName = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.LocatorName.ToString(), rNum);
                    string key         = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.Data.ToString(), rNum);
                    string runMode     = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.RunMode.ToString(), rNum);
                    Dictionary <string, string> locatorData = DataUtility.locatorData(xls, locatorName);
                    if (!key.Equals(""))
                    {
                        data = testData[key];
                    }
                    Enum.LogStatus resultStatus = Enum.LogStatus.Passed;
                    switch (keyword)
                    {
                    case "openbrowser":
                        resultStatus = openBrowser(data);
                        break;

                    case "navigateprod":
                        resultStatus = navigateprod();
                        break;

                    case "navigateTest":
                        resultStatus = navigateTest();
                        break;

                    case "navigateStage":
                        resultStatus = navigateStage();
                        break;

                    case "click":
                        resultStatus = ClickOnElementWhenElementFound(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), locatorName);
                        break;

                    case "input":
                        resultStatus = SendKeysForElement(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), data, locatorName);
                        break;

                    case "selectValueFromDropdownByText":
                        resultStatus = SendKeysForElement(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), data, locatorName);
                        break;

                    case "IsElementPresent":
                        resultStatus = SendKeysForAElement(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), data, locatorName);
                        break;

                    case "wait":
                        resultStatus = threadWait(7500);
                        break;

                    case "waits":
                        resultStatus = threadWait(20000);
                        break;

                    case "MaxWait":
                        resultStatus = threadWait(80000);
                        break;

                    case "mimwait":
                        resultStatus = threadWait(3000);
                        break;

                    case "hover":
                        resultStatus = mouseHoverWithoutClick(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), locatorName);
                        break;

                    case "hoverClick":
                        resultStatus = mouseHover(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault());
                        break;

                    case "jsClick":
                        resultStatus = jsClick(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), locatorName);
                        break;

                    case "inputAndEnter":
                        resultStatus = SendKeysForAElement(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), data, locatorName);
                        break;

                    case "TDupdation_CCMUserLogin":
                        Appobj.TDupdation_CCMUserLogin(testData);
                        break;

                    case "TDupdation_AzureADLogin":
                        Appobj.TDupdation_AzureADLogin(testData);
                        break;

                    case "AzureADLogin":
                        Appobj.AzureADLogin(testData);
                        break;

                    case "CCM_UserLogin":
                        Appobj.CCM_UserLogin(testData);
                        break;

                    case "Credentail_Verfiy":
                        Appobj.Credentail_Verfiy(testData);
                        break;

                    case "HomePage_CCSDashboard":
                        homePageobj.HomePage_CCSDashboard(testData);
                        break;

                    case "NavigationContracts":
                        homePageobj.NavigationContracts(testData);
                        break;

                    case "PdfIconinGrid":
                        homePageobj.PdfIconinGrid(testData);
                        break;

                    case "Sorting":
                        homePageobj.Sorting(testData);
                        break;

                    case "HomePage_FilterIcon":
                        homePageobj.HomePage_FilterIcon(testData);
                        break;

                    case "NewAddContratctTab":
                        contractsobj.NewAddContratctTab(testData);
                        break;

                    case "ContractsPage":
                        contractsobj.ContractsPage(testData);
                        break;

                    case "Scrollanywheres":
                        contractsobj.Scrollanywheres(testData);
                        break;

                    case "Contracts_GridHader":
                        contractsobj.Contracts_GridHader(testData);
                        break;

                    case "NewlyCreatedGrid":
                        contractsobj.NewlyCreatedGrid(testData);
                        break;

                    case "AddL1Document":
                        contractsobj.AddL1Document(testData);
                        break;

                    case "ValdationContractTree":
                        contractsobj.ValdationContractTree(testData);
                        break;

                    case "AddObligation":
                        contractsobj.AddObligation(testData);
                        break;

                    case "ValidateObligations":
                        contractsobj.ValidateObligations(testData);
                        break;

                    case "AddwithExcel":
                        contractsobj.AddwithExcel(testData);
                        break;

                    case "NavigateBacktoCSName":
                        contractsobj.NavigateBacktoCSName(testData);
                        break;

                    case "ActiveContract":
                        contractsobj.ActiveContract(testData);
                        break;

                    case "ActiveContract_Last":
                        contractsobj.ActiveContract_Last(testData);
                        break;

                    case "DeleteContract":
                        contractsobj.DeleteContract(testData);
                        break;

                    case "RequestedBy":
                        contractsobj.RequestedBy(testData);
                        break;

                    case "HighRiskItemsTab":
                        contractsobj.HighRiskItemsTab(testData);
                        break;

                    case "PdfandExcelIcon":
                        contractsobj.PdfandExcelIcon(testData);
                        break;

                    case "AuditLogs":
                        contractsobj.AuditLogs(testData);
                        break;

                    case "AuditLogs_gridvlidate":
                        contractsobj.AuditLogs_gridvlidate(testData);
                        break;

                    case "ContractDump":
                        contractsobj.ContractDump(testData);
                        break;

                    case "AuditLog":
                        contractsobj.AuditLog(testData);
                        break;

                    case "FileTab":
                        contractsobj.FileTab(testData);
                        break;

                    case "ObligationPage":
                        Obligationobj.ObligationPage(testData);
                        break;

                    case "StandardReportPage":
                        StandardReportsObj.StandardReportPage(testData);
                        break;

                    case "StandardReportGrid":
                        StandardReportsObj.StandardReportGrid(testData);
                        break;

                    case "CustomReportPage":
                        CustomReportsObj.CustomReportPage(testData);
                        break;

                    case "CustomReportGrid":
                        CustomReportsObj.CustomReportGrid(testData);
                        break;

                    case "ReportPage":
                        ReprtsTemplateObj.ReportPage(testData);
                        break;

                    case "ChangeRequestPage":
                        ChangeRequetsObj.ChangeRequestPage(testData);
                        break;

                    case "HaderforChangeRequest":
                        ChangeRequetsObj.HaderforChangeRequest(testData);
                        break;

                    case "OtherWindowChangeRequest":
                        ChangeRequetsObj.OtherWindowChangeRequest(testData);
                        break;

                    case "PdfandExcelIconforChangeRequest":
                        ChangeRequetsObj.PdfandExcelIconforChangeRequest(testData);
                        break;

                    case "AddChangeRequest":
                        ChangeRequetsObj.AddChangeRequest(testData);
                        break;

                    case "SearchPage_Obligation":
                        ObligationSearchObj.SearchPage_Obligation(testData);
                        break;

                    case "SearchPage_ObligationFilters":
                        ObligationSearchObj.SearchPage_ObligationFilters(testData);
                        break;

                    case "SearchPage_User":
                        USerSearchObj.SearchPage_User(testData);
                        break;

                    case "SearchwithName":
                        USerSearchObj.SearchwithName(testData);
                        break;

                    case "ArchivePage":
                        ArchiveObj.ArchivePage(testData);
                        break;

                    case "PDFandExcelIcon_Archive":
                        ArchiveObj.PDFandExcelIcon_Archive(testData);
                        break;

                    case "BulkChangePage":
                        bulkChangeObj.BulkChangePage(testData);
                        break;

                    case "BulkchangeGrid":
                        bulkChangeObj.BulkchangeGrid(testData);
                        break;

                    case "UploadandAddtional":
                        bulkChangeObj.UploadandAddtional(testData);
                        break;

                    case "PDFandExcelIcon_Bulk":
                        bulkChangeObj.PDFandExcelIcon_Bulk(testData);
                        break;
                    }
                    if (!resultStatus.Equals(Enum.LogStatus.Passed))
                    {
                        ExtentTestManager._parentTest.Log(Status.Fail, "Automation Unable to locate the Element " + "  " + tcid + " -- " + keyword + " -- " + data);
                        GeneralMethod.ScreenShotCapture();
                        Assert.Fail(resultStatus.ToString());
                    }
                }
            }
        }