void CertificateFilter() { Thread.Sleep(1000); //Select Alaska as Jurisdiction ScrollToView(By.CssSelector("#dashbdFilters > div:nth-child(1) > div")); BaseTest.Driver.FindElement(By.CssSelector("#dashbdFilters > div:nth-child(1) > div > i")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Jurisdiction'])[1]/following::div[2]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Filter by Jurisdiction'])[1]/following::div[2]")).Click(); BaseTest.Driver.FindElement(By.CssSelector("#dashbdFilters > div:nth-child(1) > div > i")).Click(); Thread.Sleep(1000); //Select Certificate of Authority as Certificate Type BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='License Type'])[1]/following::i[1]")).Click(); Thread.Sleep(1000); BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdFilters']/div[2]/div/div[2]/div[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='AK-Certificate of Authority'])[1]/following::div[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Inventory Certificate'])[1]/following::h3[1]")).Click(); Thread.Sleep(1000); //Assert the correct Certificate is loaded Assert.AreEqual("Alaska Biennial Report", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Primary location'])[1]/following::h5[1]")).Text); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Loading'])[2]/following::button[1]")).Click(); BaseTest.WriteTestResult("Certificate Filter Successful"); }
void JurisdictionFilter() { Thread.Sleep(1500); BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdNav']/div/a[2]/i")).Click(); Thread.Sleep(1000); iconClick = BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Jurisdiction'])[1]/following::i[1]")); ScrollToView(By.CssSelector("#dashbdFilters > div:nth-child(1) > div")); iconClick.Click(); // Open Juristiction List BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Jurisdiction'])[1]/following::div[4]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Alaska'])[2]/following::div[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Oregon'])[1]/following::div[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Jurisdiction'])[1]/following::i[1]")).Click(); Assert.AreEqual("ALASKA", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Status'])[2]/following::div[2]")).Text); Console.WriteLine("Alaska Verified"); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Third Party Administrator'])[3]/following::td[3]")).Click(); Assert.AreEqual("ARIZONA", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Third Party Administrator'])[3]/following::div[3]")).Text); Console.WriteLine("Arizona Verified"); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Third Party Administrator'])[4]/following::div[3]")).Click(); Assert.AreEqual("UTAH", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Third Party Administrator'])[4]/following::div[3]")).Text); Console.WriteLine("Utah Verified"); BaseTest.WriteTestResult("RenewalsByJurisdiction Completed"); }
void StatusFilters() { Thread.Sleep(1000); BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdNav']/div/a[3]/i")).Click(); // Validate "Under Review at Cornerstone status" BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdFilters']/div[1]/div/i")).Click(); BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdFilters']/div[1]/div/div[2]/div[3]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='()'])[1]/following::td[1]")).Click(); Assert.AreEqual("Certificate of Authority", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='()'])[1]/following::td[1]")).Text); Thread.Sleep(1000); Assert.AreEqual("ui fitted large teal history icon", BaseTest.Driver.FindElement(By.XPath("//*[@id='listView']/div/div[2]/table/tbody/tr[2]/td[3]/div/i")).GetAttribute("class")); Console.Write("Under Review at Cornerstone Status Successful"); Thread.Sleep(500); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='List view'])[1]/following::button[1]")).Click(); Thread.Sleep(1000); // Validate "In Process With Client status" BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Status'])[1]/following::i[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdFilters']/div[1]/div/div[2]/div[2]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='()'])[1]/following::td[1]")).Click(); Assert.AreEqual("Debt Collection License Or Registration", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='()'])[1]/following::td[1]")).Text); Thread.Sleep(1000); Assert.AreEqual("ui fitted large yellow wait icon", BaseTest.Driver.FindElement(By.XPath("//*[@id='listView']/div/div[2]/table/tbody/tr[2]/td[3]/div/i")).GetAttribute("class")); Console.Write("In Process with Client Status Successful"); BaseTest.WriteTestResult("Changes by Status completed"); }
void ValidateDownload() { PdfViewerControl documentViewer = new PdfViewerControl(); documentViewer.Load(@"C:\Users\CstoneAdmin\Downloads\Cornerstone-ServiceItemReports.pdf"); Dictionary <int, List <RectangleF> > textSearch = new Dictionary <int, List <RectangleF> >(); bool IsMatchFound = documentViewer.FindText("Portal Demo", out textSearch); documentViewer.Dispose(); BaseTest.WriteTestResult("Renewals Service item Report Output Validated"); }
void SearchValidation() { Thread.Sleep(2000); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Search all'])[1]/following::input[1]")).Clear(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Search all'])[1]/following::input[1]")).SendKeys("UT-Certificate"); Thread.Sleep(1000); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Utah'])[2]/following::span[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Maintenance Filings'])[1]/following::h5[1]")).Click(); Thread.Sleep(1000); Assert.AreEqual("Utah Annual Report", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Maintenance Filings'])[1]/following::h5[1]")).Text); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Loading'])[2]/following::button[1]")).Click(); BaseTest.WriteTestResult("Search Validation Successful"); }
void SearchFilter() { Thread.Sleep(1500); BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdNav']/div/a[3]/i")).Click(); Thread.Sleep(1000); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Search all'])[1]/following::input[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Search all'])[1]/following::input[1]")).Clear(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Search all'])[1]/following::input[1]")).SendKeys("Oregon"); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Status'])[2]/following::td[1]")).Click(); Assert.AreEqual("OREGON", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Status'])[2]/following::div[2]")).Text); BaseTest.WriteTestResult("Changes Search Validation Successful"); }
void HeaderNavigation() { BaseTest.Driver.FindElement(By.LinkText("Contact")).Click(); Thread.Sleep(1000); // Validate Contact page clicked for (int second = 0; ; second++) { if (second >= 60) { Assert.Fail("timeout"); } try { if ("SEND A MESSAGE REGARDING A SPECIFIC SUBJECT/SERVICE" == BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Cornerstone Support Contacts'])[1]/following::p[1]")).Text) { Console.WriteLine("Contact Link Successful"); break; } } catch (Exception) { } Thread.Sleep(1000); } BaseTest.Driver.FindElement(By.LinkText("Services")).Click(); // Validate Services page clicked for (int second = 0; ; second++) { if (second >= 60) { Assert.Fail("timeout"); } try { if ("Cornerstone Support Services" == BaseTest.Driver.FindElement(By.XPath("//*[@id='servicesMenu']/div[1]")).Text) { Console.WriteLine("Service Link Successful"); break; } } catch (Exception) { } Thread.Sleep(1000); } BaseTest.WriteTestResult("HeaderNavigation Navigation Successful"); }
void JurisdictionFilter() { Thread.Sleep(1500); BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdNav']/div/a[3]/i")).Click(); Thread.Sleep(1000); iconClick = BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Jurisdiction'])[1]/following::i[1]")); ScrollToView(By.CssSelector("#dashbdFilters > div:nth-child(1) > div")); iconClick.Click(); // Open Juristiction List Thread.Sleep(500); BaseTest.Driver.FindElement(By.CssSelector("#dashbdFilters > div:nth-child(2) > div > div.menu.transition.visible > div:nth-child(8)")).Click(); //Select New Mexico BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Status'])[2]/following::td[1]")).Click(); Assert.AreEqual("NEW MEXICO", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Status'])[2]/following::div[2]")).Text); //Validate New Mexico in the results panel BaseTest.WriteTestResult("ChangesByJurisdiction Completed"); }
void DownloadValidation() { Thread.Sleep(2000); Thread.Sleep(1000); ScrollToView(By.CssSelector("#dashbdFilters > div:nth-child(1) > div")); BaseTest.Driver.FindElement(By.CssSelector("#dashbdFilters > div:nth-child(1) > div > i")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Jurisdiction'])[1]/following::div[2]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Filter by Jurisdiction'])[1]/following::div[2]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Alaska'])[2]/following::div[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Oregon'])[1]/following::div[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Jurisdiction'])[1]/following::i[1]")).Click(); Thread.Sleep(1000); BaseTest.Driver.FindElement(By.Name("zipDocs")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Debt Collection License Or Registration'])[2]/following::input[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Debt Collection License Or Registration'])[4]/following::input[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Certificate of Authority'])[4]/following::input[1]")).Click(); Assert.AreEqual("4", BaseTest.Driver.FindElement(By.LinkText("4")).Text); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Downloadable Certificates'])[1]/following::div[3]")).Click(); BaseTest.WriteTestResult("Download Validation Successful"); }
void LicenseValidation() { Thread.Sleep(1500); BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdNav']/div/a[2]/i")).Click(); Thread.Sleep(1000); iconClick = BaseTest.Driver.FindElement(By.XPath("//*[@id='dashbdFilters']/div[3]/div/i")); ScrollToView(By.CssSelector("#dashbdFilters > div:nth-child(1) > div")); iconClick.Click(); // Open License Type List BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Filter by License Types'])[1]/following::div[2]")).Click(); //Select Certificate of Authority BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Lender'])[1]/following::div[1]")).Click(); //Select Third Party Administration //Assert Certificate of Authority in results pane BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='(Primary location)'])[1]/following::td[1]")).Click(); Assert.AreEqual("Certificate of Authority", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='(Primary location)'])[1]/following::td[1]")).Text); //Assert Third party administrator in results pane BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='(Primary location)'])[2]/following::td[1]")).Click(); Assert.AreEqual("Third Party Administrator", BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='(Primary location)'])[2]/following::td[1]")).Text); BaseTest.WriteTestResult("Renewals License Filter Validated"); }
void ValidateDownload() { //PdfLoadedDocument loadedDocument = new PdfLoadedDocument(@"C:\Users\CstoneAdmin\Downloads\Cornerstone-ServiceItemReports.pdf"); //PdfPageBase page = loadedDocument.Pages[0]; //string extractedTexts = page.ExtractText(true); //BaseTest.WriteReportResult(extractedTexts); //loadedDocument.Close(true); PdfViewerControl documentViewer = new PdfViewerControl(); documentViewer.Load(@"C:\Users\CstoneAdmin\Downloads\Cornerstone-ServiceItemReports.pdf"); Dictionary <int, List <RectangleF> > textSearch = new Dictionary <int, List <RectangleF> >(); bool IsMatchFound = documentViewer.FindText("Portal Demo", out textSearch); documentViewer.Dispose(); BaseTest.WriteTestResult("Changes Service item Report Output Validated"); }
private void JurisdictionFilter() { Thread.Sleep(1000); ScrollToView(By.CssSelector("#dashbdFilters > div:nth-child(1) > div")); BaseTest.Driver.FindElement(By.CssSelector("#dashbdFilters > div:nth-child(1) > div > i")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Jurisdiction'])[1]/following::div[2]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Filter by Jurisdiction'])[1]/following::div[2]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Alaska'])[2]/following::div[1]")).Click(); BaseTest.Driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Oregon'])[1]/following::div[1]")).Click(); //Validate Alaska is present for (int second = 0; ; second++) { if (second >= 60) { Assert.Fail("timeout"); } try { if ("ALASKA" == BaseTest.Driver.FindElement(By.XPath("//*[@id='listView']/div/div[2]/table/tbody/tr[1]/td/div")).Text) { Console.WriteLine("Alaska Test Succeeded"); break; } } catch (Exception) { } Thread.Sleep(1000); } //Validate Arizona is present for (int second = 0; ; second++) { if (second >= 60) { Assert.Fail("timeout"); } try { if ("ARIZONA" == BaseTest.Driver.FindElement(By.XPath("//*[@id='listView']/div/div[2]/table/tbody/tr[5]/td/div")).Text) { Console.WriteLine("Arizona Test Succeeded"); break; } } catch (Exception) { } Thread.Sleep(1000); } //Validate Utah is present for (int second = 0; ; second++) { if (second >= 60) { Assert.Fail("timeout"); } try { if ("UTAH" == BaseTest.Driver.FindElement(By.XPath("//*[@id='listView']/div/div[2]/table/tbody/tr[9]/td/div")).Text) { Console.WriteLine("Utah Test Succeeded"); break; } } catch (Exception) { } Thread.Sleep(1000); } BaseTest.WriteTestResult("All Inventory Jurisdiction Filter Validated"); }