public void deletePDFTemplateCorp() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_corp"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var corpPDFTemplate_ImportWizardHelper = new CorpPDFTemplate_ImportWizardHelper(GetWebDriver()); // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("DeletePDFTemplateCorp", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("DeletePDFTemplateCorp", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("DeletePDFTemplateCorp", "Redirect To Import"); VisitCorp("pdf_templates/import"); executionLog.Log("DeletePDFTemplateCorp", "ChooseModule"); corpPDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients"); executionLog.Log("DeletePDFTemplateCorp", "Uplaod a pdf file."); var path = GetPathToFile() + "2.pdf"; corpPDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", path); executionLog.Log("DeletePDFTemplateCorp", "Click import after importing file"); corpPDFTemplate_ImportWizardHelper.ClickElement("Import"); corpPDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("DeletePDFTemplateCorp", "ClickOnNext"); corpPDFTemplate_ImportWizardHelper.ClickElement("Next"); corpPDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("DeletePDFTemplateCorp", "Select Category"); corpPDFTemplate_ImportWizardHelper.SelectByText("SelectCatory", "Other"); executionLog.Log("DeletePDFTemplateCorp", "ClickOnSave"); corpPDFTemplate_ImportWizardHelper.ClickElement("Save"); executionLog.Log("DeletePDFTemplateCorp", "Verify message"); corpPDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10); executionLog.Log("DeletePDFTemplateCorp", "Redirect to pdf templates."); VisitCorp("pdf_templates"); corpPDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("DeletePDFTemplateCorp", "Enter pdf to search."); corpPDFTemplate_ImportWizardHelper.TypeText("SearchPDF", "2.pdf"); corpPDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("DeletePDFTemplateCorp", "ModuleToSearch"); corpPDFTemplate_ImportWizardHelper.Select("ModuleToSearch", "clients"); corpPDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("DeletePDFTemplateCorp", "Click on pdf"); corpPDFTemplate_ImportWizardHelper.ClickElement("PDF1"); executionLog.Log("DeletePDFTemplateCorp", "Click On Delete"); corpPDFTemplate_ImportWizardHelper.ClickElement("DeletePDF"); executionLog.Log("DeletePDFTemplateCorp", "Accept alert message."); corpPDFTemplate_ImportWizardHelper.AcceptAlert(); executionLog.Log("DeletePDFTemplateCorp", "Wait for success message."); corpPDFTemplate_ImportWizardHelper.WaitForText("PDF Template Deleted Successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("DeletePDFTemplateCorp"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Delete PDF Template Corp"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Delete PDF Template Corp", "Bug", "Medium", "PDF page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Delete PDF Template Corp"); TakeScreenshot("DeletePDFTemplateCorp"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DeletePDFTemplateCorp.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("DeletePDFTemplateCorp"); string id = loginHelper.getIssueID("Delete PDF Template Corp"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\DeletePDFTemplateCorp.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Delete PDF Template Corp"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Delete PDF Template Corp"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("DeletePDFTemplateCorp"); executionLog.WriteInExcel("Delete PDF Template Corp", Status, JIRA, "Corp PDF template"); } }
public void clientZipCode() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); // Variable var DBA = "Client" + RandomNumber(1222, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientZipCode", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ClientZipCode", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ClientZipCode", "Create Client"); VisitOffice("clients/create"); executionLog.Log("ClientZipCode", "Verify page title"); VerifyTitleMerchantClient(); executionLog.Log("ClientZipCode", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("ClientZipCode", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("ClientZipCode", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("ClientZipCode", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("ClientZipCode", "Wait for element to be visible."); office_ClientsHelper.WaitForElementPresent("CompanyDetails", 10); executionLog.Log("ClientZipCode", "Goto Company details tab."); office_ClientsHelper.ClickElement("CompanyDetails"); executionLog.Log("ClientZipCode", "Enter Client federal tax id."); office_ClientsHelper.TypeText("FederalTaxID", "111122222"); executionLog.Log("ClientZipCode", "Enter Mail Client Address"); office_ClientsHelper.TypeText("AddressLine1MailingAddress", "Test"); executionLog.Log("ClientZipCode", "Enter Mailing Zip Code"); office_ClientsHelper.TypeText("ZipCodeMailingAddress", "60601"); executionLog.Log("ClientZipCode", "Click On Client Contact Tab"); office_ClientsHelper.ClickElement("ContactDetails"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Enetr Client First Name"); office_ClientsHelper.TypeText("ContactFirstName", "My Client"); executionLog.Log("ClientZipCode", "Enter Zip Code"); office_ClientsHelper.TypeText("ContactZipCode", "60601"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientZipCode", "Redirect at clients page."); VisitOffice("clients"); executionLog.Log("ClientZipCode", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(4000); executionLog.Log("ClientZipCode", "Select client by check box"); office_ClientsHelper.ClickElement("ClickOn1stOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("ClientZipCode", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientZipCode", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("ClientZipCode", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); executionLog.Log("ClientZipCode", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBA); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Select all in responsibity"); office_ClientsHelper.SelectByText("ClientResponsibityRecycle", "All"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("ClientZipCode", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("ClientZipCode", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("ClientZipCode", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientZipCode"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client Zip Code"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Zip Code", "Bug", "Medium", "Client page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Client Zip Code"); TakeScreenshot("ClientZipCode"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientZipCode.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientZipCode"); string id = loginHelper.getIssueID("Client Zip Code"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientZipCode.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client Zip Code"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client Zip Code"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientZipCode"); executionLog.WriteInExcel("Client Zip Code", Status, JIRA, "Client Management"); } }
public void opportunitiesAdvanceFilterResultsPP() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); // Variable var DocName = "Test Exe" + GetRandomNumber(); var fileUpl = GetPathToFile() + "chrome.exe"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Redirect To URL"); VisitOffice("opportunities"); office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify page title."); VerifyTitle("Opportunities"); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on advance filter."); office_OpportunitiesHelper.ClickElement("AdvanceFilter"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Select number of records to 10."); office_OpportunitiesHelper.SelectByText("ResultsPerPage", "10"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on apply button."); office_OpportunitiesHelper.ClickElement("Apply"); office_OpportunitiesHelper.WaitForWorkAround(3000); //office_OpportunitiesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify number of records displayed."); office_OpportunitiesHelper.ShowResult(10); // office_OpportunitiesHelper.VerifyText("No.ofResults", "Showing 1 - 10 of"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on advance filter."); office_OpportunitiesHelper.ClickElement("AdvanceFilter"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Select number of records to 20."); office_OpportunitiesHelper.SelectByText("ResultsPerPage", "20"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on apply button."); office_OpportunitiesHelper.ClickElement("Apply"); office_OpportunitiesHelper.WaitForWorkAround(3000); //office_OpportunitiesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify number of records displayed."); office_OpportunitiesHelper.ShowResult(20); // office_OpportunitiesHelper.VerifyText("No.ofResults", "Showing 1 - 20 of"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on advance filter."); office_OpportunitiesHelper.ClickElement("AdvanceFilter"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Select number of records to 50."); office_OpportunitiesHelper.SelectByText("ResultsPerPage", "50"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on apply button."); office_OpportunitiesHelper.ClickElement("Apply"); office_OpportunitiesHelper.WaitForWorkAround(3000); //office_OpportunitiesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify number of records displayed."); office_OpportunitiesHelper.ShowResult(50); //office_OpportunitiesHelper.VerifyText("No.ofResults", "Showing 1 - 50 of"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on advance filter."); office_OpportunitiesHelper.ClickElement("AdvanceFilter"); office_OpportunitiesHelper.WaitForWorkAround(2000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Select number of records to 100."); office_OpportunitiesHelper.SelectByText("ResultsPerPage", "100"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Click on apply button."); office_OpportunitiesHelper.ClickElement("Apply"); office_OpportunitiesHelper.WaitForWorkAround(3000); //office_OpportunitiesHelper.WaitForElementPresent("No.ofResults", 10); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Verify number of records displayed."); office_OpportunitiesHelper.ShowResult(100); // office_OpportunitiesHelper.VerifyText("No.ofResults", "Showing 1 - 100 of"); //office_OpportunitiesHelper.WaitForWorkAround(3000); executionLog.Log("OpportunitiesAdvanceFilterResultsPP", "Logout from the application."); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("OpportunitiesAdvanceFilterResultsPP"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Opportunities Advance Filter ResultsPP"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Opportunities Advance Filter ResultsPP", "Bug", "Medium", "Opportunities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"); TakeScreenshot("OpportunitiesAdvanceFilterResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunitiesAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("OpportunitiesAdvanceFilterResultsPP"); string id = loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\OpportunitiesAdvanceFilterResultsPP.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Opportunities Advance Filter ResultsPP"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("OpportunitiesAdvanceFilterResultsPP"); executionLog.WriteInExcel("Opportunities Advance Filter ResultsPP", Status, JIRA, "Opportunities Management"); } }
public void corpOfficeUrlChange() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_corp"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var corp_Office_OfficeHelper = new CorpOffice_OfficeHelper(GetWebDriver()); // Variable var FirstName = "Test" + GetRandomNumber(); var LastName = "Tester" + GetRandomNumber(); var Number = "12345678" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("CorpOfficeUrlChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("CorpOfficeUrlChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("CorpOfficeUrlChange", "Go To office"); VisitCorp("offices"); executionLog.Log("CorpOfficeUrlChange", "Click On any Office"); corp_Office_OfficeHelper.ClickElement("ClickOnAnyCorp"); corp_Office_OfficeHelper.WaitForWorkAround(1000); executionLog.Log("CorpOfficeUrlChange", "Change the url with the url number of another Corp"); VisitCorp("offices/view/117"); executionLog.Log("CorpOfficeUrlChange", "Verify Validation"); corp_Office_OfficeHelper.WaitForText("oops something went wrong.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("CorpOfficeUrlChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Corp Office Url Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Corp Office Url Change", "Bug", "Medium", "Corp office page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Corp Office Url Change"); TakeScreenshot("CorpOfficeUrlChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CorpOfficeUrlChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("CorpOfficeUrlChange"); string id = loginHelper.getIssueID("Corp Office Url Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CorpOfficeUrlChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Corp Office Url Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Corp Office Url Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("CorpOfficeUrlChange"); executionLog.WriteInExcel("Corp Office Url Change", Status, JIRA, "Corp office"); } }
public void exportingReportInPartnerAgent() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var residual_income_officePayoutHelper = new ResidualIncome_OfficePayoutHelper(GetWebDriver()); // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ExportingReportInPartnerAgent ", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("ExportingReportInPartnerAgent ", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ExportingReportInPartnerAgent ", "Redirect To Report Columns page"); GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/newthemecorp/pegasustestoffice/rir/report_columns"); residual_income_officePayoutHelper.WaitForWorkAround(2000); executionLog.Log("ExportingReportInPartnerAgent ", "Check Merchant ID checkbox"); bool checkbox = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnMerchantNumber']"); if (checkbox == false) { residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnMerchantNumber']"); } else { } executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Sales Transaction checkbox"); bool checkbox2 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnSalesTrans']"); if (checkbox == true) { residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnSalesTrans']"); } else { } executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Average Ticket checkbox"); bool checkbox3 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnAvgTicket']"); if (checkbox3 == true) { residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnAvgTicket']"); } else { } executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Office Income checkbox"); bool checkbox4 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnOfficeIncome']"); if (checkbox4 == true) { residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnOfficeIncome']"); } else { } executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Office Adjustment checkbox"); bool checkbox5 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnAdjustment']"); if (checkbox5 == true) { residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnAdjustment']"); } else { } executionLog.Log("ExportingReportInPartnerAgent ", "Uncheck Agent Revenue Share checkbox"); bool checkbox6 = residual_income_officePayoutHelper.isChecked("//*[@id='RirOrgReportColumnRevShare']"); if (checkbox5 == true) { residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnRevShare']"); } else { } executionLog.Log("ExportingReportInPartnerAgent ", "Click on Save button"); residual_income_officePayoutHelper.ClickViaJavaScript("//*[@id='RirOrgReportColumnReportColumnsForm']/div[4]/div/button"); executionLog.Log("VerifyCreatedIframeOnPartnerAssociationPage", "Wait for creation success text."); residual_income_officePayoutHelper.WaitForText("Report display columns updated successfully.", 10); executionLog.Log("ExportingReportInPartnerAgent ", "Logout from the application."); VisitOffice("logout"); executionLog.Log("ExportingReportInPartnerAgent ", "Login with valid username and password"); Login("aslampartneragent", "123456"); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); residual_income_officePayoutHelper.WaitForWorkAround(3000); executionLog.Log("ExportingReportInPartnerAgent ", "Redirect To Report Columns page"); GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/newthemecorp/pegasustestoffice/partners/reports"); residual_income_officePayoutHelper.WaitForWorkAround(2000); executionLog.Log("ExportingReportInPartnerAgent ", "Select Reporting Period"); residual_income_officePayoutHelper.Select("ReportingPeriod", "2018-04-01"); executionLog.Log("ExportingReportInPartnerAgent ", "Select File Date"); residual_income_officePayoutHelper.Select("FileDate", "2018-03-01"); executionLog.Log("ExportingReportInPartnerAgent ", "Select Processor"); residual_income_officePayoutHelper.Select("Processor", "FIRST BANK OF DELAWARE"); residual_income_officePayoutHelper.WaitForWorkAround(4000); executionLog.Log("ExportingReportInPartnerAgent ", "Select File Format"); residual_income_officePayoutHelper.Select("FileFormat", "Pegasus"); executionLog.Log("ExportingReportInPartnerAgent ", "Search Payouts"); residual_income_officePayoutHelper.ClickElement("Searchreport"); residual_income_officePayoutHelper.WaitForWorkAround(6000); executionLog.Log("ExportingReportInPartnerAgent ", "Verify Reports Generated"); residual_income_officePayoutHelper.VerifyPageText("NewThemeCorp Residual Reports"); executionLog.Log("ExportingReportInPartnerAgent ", "Click on Export in Excel"); residual_income_officePayoutHelper.ClickElement("Exportexl"); residual_income_officePayoutHelper.WaitForWorkAround(2000); executionLog.Log("ExportingReportInPartnerAgent ", "Click on Export in PDF"); residual_income_officePayoutHelper.ClickElement("Exportpdf"); residual_income_officePayoutHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ExportingReportInPartnerAgent "); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("ExportingReportInPartnerAgent "); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Exporting Report In Partner Agent ", "Bug", "Medium", "Corp Employee page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Exporting Report In Partner Agent "); TakeScreenshot("ExportingReportInPartnerAgent "); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ExportingReportInPartnerAgent .png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ExportingReportInPartnerAgent "); string id = loginHelper.getIssueID("Exporting Report In Partner Agent "); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ExportingReportInPartnerAgent .png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Exporting Report In Partner Agent "), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Exporting Report In Partner Agent "); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ExportingReportInPartnerAgent "); executionLog.WriteInExcel("Exporting Report In Partner Agent ", Status, JIRA, "Corp Employee"); } }
public void makeStatusInactivePDFTemplate() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var pDFTemplate_PDFTemplateHelper = new PDFTemplate_PDFTemplateHelper(GetWebDriver()); // Variable random String Status = "Pass"; String JIRA = ""; try { executionLog.Log("MakeStatusInActivePDFTemplate", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("MakeStatusInActivePDFTemplate", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("MakeStatusInActivePDFTemplate", "Redirect To template"); VisitOffice("pdf_templates"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000); executionLog.Log("MakeStatusInActivePDFTemplate", "Enter PDF TO sEARCH"); pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFToSearch", "2.pdf"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); executionLog.Log("MakeStatusInActivePDFTemplate", "SelectModuleToSearch"); pDFTemplate_PDFTemplateHelper.Select("SelectModuleToSearch", "merchants"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); var loc = "//table[@id='list1']/tbody/tr[2]"; if (pDFTemplate_PDFTemplateHelper.IsElementPresent(loc)) { executionLog.Log("MakeStatusInActivePDFTemplate", "Click on edit icon"); pDFTemplate_PDFTemplateHelper.ClickElement("ClickOnEdit"); executionLog.Log("MakeStatusInActivePDFTemplate", "Select status as inactive."); pDFTemplate_PDFTemplateHelper.Select("SelectStatusDeactive", "0"); executionLog.Log("MakeStatusInActivePDFTemplate", "Click Save button"); pDFTemplate_PDFTemplateHelper.ClickElement("SaveEdit"); executionLog.Log("MakeStatusInActivePDFTemplate", "Verify message"); pDFTemplate_PDFTemplateHelper.WaitForText("PDF Template Updated Successfully.", 10); } else { executionLog.Log("MakeStatusInActivePDFTemplate", "Redirect To Import"); VisitOffice("pdf_templates/import"); executionLog.Log("MakeStatusInActivePDFTemplate", "ChooseModule"); pDFTemplate_PDFTemplateHelper.Select("ChooseModule", "20"); var path = @"D:\NEWPEG\TestAutomationProject\PegasusTests\Files\2.pdf"; executionLog.Log("MakeStatusInActivePDFTemplate", "upload file"); pDFTemplate_PDFTemplateHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", path); executionLog.Log("MakeStatusInActivePDFTemplate", "Click on import"); pDFTemplate_PDFTemplateHelper.ClickElement("Import"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000); executionLog.Log("MakeStatusInActivePDFTemplate", "ClickOnNext"); pDFTemplate_PDFTemplateHelper.ClickElement("ClickOnNext"); executionLog.Log("MakeStatusInActivePDFTemplate", "Select Category"); pDFTemplate_PDFTemplateHelper.SelectByText("SelectCategory", "Other"); executionLog.Log("MakeStatusInActivePDFTemplate", "ClickOnSave"); pDFTemplate_PDFTemplateHelper.ClickElement("Save"); executionLog.Log("MakeStatusInActivePDFTemplate", "Verify message"); pDFTemplate_PDFTemplateHelper.WaitForText("PDF Template options saved successfully.", 10); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); executionLog.Log("MakeStatusInActivePDFTemplate", "Enter PDF TO sEARCH"); pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFToSearch", "2.pdf"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); executionLog.Log("MakeStatusInActivePDFTemplate", "Select Module To Search"); pDFTemplate_PDFTemplateHelper.Select("SelectModuleToSearch", "merchants"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); executionLog.Log("MakeStatusInActivePDFTemplate", "Click on edit"); pDFTemplate_PDFTemplateHelper.ClickElement("ClickOnEdit"); executionLog.Log("MakeStatusInActivePDFTemplate", "Select status as inactive."); pDFTemplate_PDFTemplateHelper.Select("SelectStatusDeactive", "0"); executionLog.Log("MakeStatusInActivePDFTemplate", "Click on Save"); pDFTemplate_PDFTemplateHelper.ClickElement("SaveEdit"); executionLog.Log("MakeStatusInActivePDFTemplate", "Verify message"); pDFTemplate_PDFTemplateHelper.WaitForText("PDF Template Updated Successfully.", 10); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("MakeStatusInActivePDFTemplate"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Make Status In Active PDF Template"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Make Status In Active PDF Template", "Bug", "Medium", "PDF page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Make Status In Active PDF Template"); TakeScreenshot("MakeStatusInActivePDFTemplate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MakeStatusInActivePDFTemplate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("MakeStatusInActivePDFTemplate"); string id = loginHelper.getIssueID("Make Status In Active PDF Template"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MakeStatusInActivePDFTemplate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Make Status In Active PDF Template"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Make Status In Active PDF Template"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("MakeStatusInActivePDFTemplate"); executionLog.WriteInExcel("Make Status In Active PDF Template", Status, JIRA, "PDF Template"); } }
public void pDFPackageWithRule() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var pDFTemplate_PDFTemplateHelper = new PDFTemplate_PDFTemplateHelper(GetWebDriver()); // Variable random var name = "Pakage" + RandomNumber(1, 999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("PDFPackageWithRule", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("PDFPackageWithRule", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("PDFPackageWithRule", "Redirect To Admin"); VisitOffice("admin"); executionLog.Log("PDFPackageWithRule", "Redirect To template page"); VisitOffice("pdf_templates"); executionLog.Log("PDFPackageWithRule", "Click ON pdf"); pDFTemplate_PDFTemplateHelper.ClickElement("PDFPackage"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(5000); executionLog.Log("PDFPackageWithRule", "Enter pakage name"); pDFTemplate_PDFTemplateHelper.TypeText("PackagePDFName", name); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); executionLog.Log("PDFPackageWithRule", "Select Module"); pDFTemplate_PDFTemplateHelper.Select("ChooseModulePakage", "20"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000); executionLog.Log("PDFPackageWithRule", "Click SelectPDFTempwithRule"); pDFTemplate_PDFTemplateHelper.ClickElement("SelectPDFTempwithRule"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000); executionLog.Log("PDFPackageWithRule", "Enter Template Rule Name"); pDFTemplate_PDFTemplateHelper.TypeText("TemplateRuleName", "Test Rule"); executionLog.Log("PDFPackageWithRule", "SelectRuleType"); pDFTemplate_PDFTemplateHelper.Select("SelectRuleTypePKG", "if"); executionLog.Log("PDFPackageWithRule", "SelectStatus"); pDFTemplate_PDFTemplateHelper.Select("SelectOperatorType", "li"); pDFTemplate_PDFTemplateHelper.SelectDropDownByText("//*[@id='ImportIndexPopIfFieldValue']", "2"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(4000); executionLog.Log("PDFPackageWithRule", "Click Add Pdf"); pDFTemplate_PDFTemplateHelper.ClickElement("ADDPDF"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(2000); executionLog.Log("PDFPackageWithRule", "Select Pakage Category"); pDFTemplate_PDFTemplateHelper.SelectByText("PakageCategory", "Other"); executionLog.Log("PDFPackageWithRule", "Save PDF Package"); pDFTemplate_PDFTemplateHelper.ClickJs("SavePDFPakage"); executionLog.Log("PDFPackageWithRule", "Verify message"); pDFTemplate_PDFTemplateHelper.WaitForText("PDF Package Template Created Successfully", 10); executionLog.Log("PDFPackageWithRule", "Redirect to templates page"); VisitOffice("pdf_templates"); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(5000); executionLog.Log("PDFPackageWithRule", "Verify title"); VerifyTitle("PDF Templates"); executionLog.Log("PDFPackageWithRule", "Search pdf template "); pDFTemplate_PDFTemplateHelper.TypeText("SearchPDF", name); pDFTemplate_PDFTemplateHelper.WaitForWorkAround(3000); executionLog.Log("PDFPackageWithRule", "Select template type pakage "); pDFTemplate_PDFTemplateHelper.Select("SelectType", "1"); executionLog.Log("PDFPackageWithRule", "Select first pdf"); pDFTemplate_PDFTemplateHelper.ClickElement("Checkbox1"); executionLog.Log("PDFPackageWithRule", "Click on delete button "); pDFTemplate_PDFTemplateHelper.ClickElement("DeletePdf"); executionLog.Log("PDFPackageWithRule", "Accept alert message. "); pDFTemplate_PDFTemplateHelper.AcceptAlert(); executionLog.Log("PDFPackageWithRule", "Wait for message "); pDFTemplate_PDFTemplateHelper.WaitForText("PDF Template Deleted Successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("PDFPackageWithRule"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("PDF Package With Rule"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("PDF Package With Rule", "Bug", "Medium", "PDF page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("PDF Package With Rule"); TakeScreenshot("PDFPackageWithRule"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PDFPackageWithRule.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("PDFPackageWithRule"); string id = loginHelper.getIssueID("PDF Package With Rule"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PDFPackageWithRule.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("PDF Package With Rule"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("PDF Package With Rule"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("PDFPackageWithRule"); executionLog.WriteInExcel("PDF Package With Rule", Status, JIRA, "PDF Import"); } }
public void createResolutionTicket() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var tickets_MasterDataHelper = new Tickets_MasterDataHelper(GetWebDriver()); // Variable var name = "Test" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("CreateResolutionTicket", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("CreateResolutionTicket", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("CreateResolutionTicket", "Click On Admin"); VisitOffice("admin"); executionLog.Log("CreateResolutionTicket", "Redirect To Ticket"); VisitOffice("tickets/masterdata/resolution"); tickets_MasterDataHelper.WaitForWorkAround(4000); executionLog.Log("CreateResolutionTicket", "Verfiy title"); VerifyTitle("Master Data"); var loc = "//a[text()='Closed']"; var text = "//a[text()='Resolved']"; var text1 = "//a[text()='Reopened']"; var text2 = "//a[text()='Fixed']"; for (int i = 1; i <= 5; i++) { if (tickets_MasterDataHelper.IsElementNotPresent(loc)) { executionLog.Log("CreateResolutionTicket", " Click On Create"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateResolutionTicket", "Verify title"); VerifyTitle("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateResolutionTicket", "Enter Name"); tickets_MasterDataHelper.TypeText("Name", "Closed"); executionLog.Log("CreateResolutionTicket", "cLICK on Save "); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("CreateResolutionTicket", "Wait for Confirmation"); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 30); } else if (tickets_MasterDataHelper.IsElementNotPresent(text)) { executionLog.Log("CreateResolutionTicket", " Click On Create"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateResolutionTicket", "Verify title"); VerifyTitle("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateResolutionTicket", "Enter Name"); tickets_MasterDataHelper.TypeText("Name", "Resolved"); executionLog.Log("CreateResolutionTicket", "cLICK on Save "); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("CreateResolutionTicket", "Wait for Confirmation"); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 30); } else if (tickets_MasterDataHelper.IsElementNotPresent(text1)) { executionLog.Log("CreateResolutionTicket", " Click On Create"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateResolutionTicket", "Verify title"); VerifyTitle("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateResolutionTicket", "Enter Name"); tickets_MasterDataHelper.TypeText("Name", "Reopened"); executionLog.Log("CreateResolutionTicket", "cLICK on Save "); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("CreateResolutionTicket", "Wait for Confirmation"); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 30); } else if (tickets_MasterDataHelper.IsElementNotPresent(text2)) { executionLog.Log("CreateResolutionTicket", " Click On Create"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateResolutionTicket", "Verify title"); VerifyTitle("Create"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateResolutionTicket", "Enter Name"); tickets_MasterDataHelper.TypeText("Name", "Fixed"); executionLog.Log("CreateResolutionTicket", "cLICK on Save "); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("CreateResolutionTicket", "Wait for Confirmation"); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 30); } else { executionLog.Log("CreateResolutionTicket", " Click On Create"); tickets_MasterDataHelper.ClickElement("Create"); tickets_MasterDataHelper.WaitForWorkAround(5000); executionLog.Log("CreateResolutionTicket", "Verify title"); VerifyTitle("Create"); executionLog.Log("CreateResolutionTicket", "Enter Name"); tickets_MasterDataHelper.TypeText("Name", name); executionLog.Log("CreateResolutionTicket", "cLICK on Save "); tickets_MasterDataHelper.ClickElement("Save"); executionLog.Log("CreateResolutionTicket", "Wait for Confirmation"); tickets_MasterDataHelper.WaitForText("Masterdata created successfully", 30); executionLog.Log("CreateResolutionTicket", "Click on delete item."); tickets_MasterDataHelper.ClickElement("DeleteItem"); tickets_MasterDataHelper.WaitForWorkAround(3000); executionLog.Log("CreateResolutionTicket", "Click on resolution to be deleted"); tickets_MasterDataHelper.DeleteCategory(name); tickets_MasterDataHelper.WaitForWorkAround(1000); executionLog.Log("CreateResolutionTicket", "Select value to be replace with"); tickets_MasterDataHelper.SelectByText("ReplaceWith", "Closed"); executionLog.Log("CreateResolutionTicket", "Confirm delete by clicking save."); tickets_MasterDataHelper.ClickElement("SaveDelete"); tickets_MasterDataHelper.AcceptAlert(); tickets_MasterDataHelper.WaitForWorkAround(4000); tickets_MasterDataHelper.VerifyPageText("Resolution deleted successfully."); break; } } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("CreateResolutionTicket"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Create Resolution Ticket"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Create Resolution Ticket", "Bug", "Medium", "Ticket page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Create Resolution Ticket"); TakeScreenshot("CreateResolutionTicket"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreateResolutionTicket.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("CreateResolutionTicket"); string id = loginHelper.getIssueID("Create Resolution Ticket"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreateResolutionTicket.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Create Resolution Ticket"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Create Resolution Ticket"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("CreateResolutionTicket"); executionLog.WriteInExcel("Create Resolution Ticket", Status, JIRA, "Ticketing System"); } }
public void leadsDocumentUrlChange() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); // Variable var File = GetPathToFile() + "leadslist.csv"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("LeadsDocumentUrlChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("LeadsDocumentUrlChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("LeadsDocumentUrlChange", "Go to All Leads"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsDocumentUrlChange", "Click On Any lead"); office_LeadsHelper.ClickElement("ClickAnyLead"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsDocumentUrlChange", "Click On Add Document"); office_LeadsHelper.ClickElement("AddDocument"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsDocumentUrlChange", "Enter Document Name"); office_LeadsHelper.TypeText("EnterDocuName", "Document Test"); executionLog.Log("LeadsDocumentUrlChange", "Upload File"); office_LeadsHelper.UploadFile("//*[@id='DocumentFiles']", File); //office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsDocumentUrlChange", "Click Save"); office_LeadsHelper.ClickDisplayed("//*[@id='CreateDocumentForm']/div[4]/button[1]"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsDocumentUrlChange", "Select Activity >> Document"); office_LeadsHelper.Select("SelectActivityType", "Documents"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsDocumentUrlChange", "select All in created by field"); office_LeadsHelper.SelectByText("CreatedByField", "All"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsDocumentUrlChange", "Click On Document"); office_LeadsHelper.ClickJS("ClickNotes1"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsDocumentUrlChange", "Change the url with the url number of another office"); VisitOffice("documents/view/41"); executionLog.Log("LeadsDocumentUrlChange", "Verify Validation"); office_LeadsHelper.WaitForText("You don't have privilege.", 10); executionLog.Log("LeadsDocumentUrlChange", "Redirect to Clients Page"); VisitOffice("leads"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsDocumentUrlChange", "Click On Any lead"); office_LeadsHelper.ClickElement("ClickAnyLead"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("LeadsDocumentUrlChange", "Select the Document in activity type"); office_LeadsHelper.SelectByText("SelectActivityType", "Documents"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsDocumentUrlChange", "Click On Document "); office_LeadsHelper.PressEnter("ClickNotes1"); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("LeadsDocumentUrlChange", "Click OnDelete icon"); office_LeadsHelper.ClickElement("DeleteDoc"); executionLog.Log("LeadsDocumentUrlChange", "Accept alert message"); office_LeadsHelper.AcceptAlert(); executionLog.Log("LeadsDocumentUrlChange", "Wait for delete message"); office_LeadsHelper.WaitForText("Document deleted successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("LeadsDocumentUrlChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Leads Document Url Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Leads Document Url Change", "Bug", "Medium", "Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Leads Document Url Change"); TakeScreenshot("LeadsDocumentUrlChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadsDocumentUrlChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LeadsDocumentUrlChange"); string id = loginHelper.getIssueID("Leads Document Url Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadsDocumentUrlChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Leads Document Url Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Leads Document Url Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LeadsDocumentUrlChange"); executionLog.WriteInExcel("Leads Document Url Change", Status, JIRA, "Leads Management"); } }
public void leadLabelSelectForCategory() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("LeadLabelSelectForCategory", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("LeadLabelSelectForCategory", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("LeadLabelSelectForCategory", "Redirects at leads page."); VisitOffice("leads"); executionLog.Log("LeadLabelSelectForCategory", "Click on any lead."); office_LeadsHelper.ClickElement("ClickAnyLead"); office_LeadsHelper.WaitForWorkAround(1000); executionLog.Log("LeadLabelSelectForCategory", "Verify label for category present."); office_LeadsHelper.VerifyText("CategoryLeads", "Click to edit"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("LeadLabelSelectForCategory"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Lead Label Select For Category"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Lead Label Select For Category", "Bug", "Medium", "Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Lead Label Select For Category"); TakeScreenshot("LeadLabelSelectForCategory"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadLabelSelectForCategory.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("LeadLabelSelectForCategory"); string id = loginHelper.getIssueID("Lead Label Select For Category"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\LeadLabelSelectForCategory.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Lead Label Select For Category"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Lead Label Select For Category"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("LeadLabelSelectForCategory"); executionLog.WriteInExcel("Lead Label Select For Category", Status, JIRA, "Leads Management"); } }
public void mergeLeadVerifyConfirmation() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_LeadsHelper = new Office_LeadsHelper(GetWebDriver()); // Random Variables. String JIRA = ""; String Status = "Pass"; var File = GetPathToFile() + "leadsamples.csv"; try { executionLog.Log("MergeLeadVerifyConfirmation", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("MergeLeadVerifyConfirmation", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("MergeLeadVerifyConfirmation", "Redirect at leads import page"); VisitOffice("leads/import"); executionLog.Log("MergeLeadVerifyConfirmation", "Upload a csv file."); office_LeadsHelper.UploadFile("//*[@id='vcard_file']", File); executionLog.Log("MergeLeadVerifyConfirmation", "Click on import button."); office_LeadsHelper.ClickElement("LeadImport"); office_LeadsHelper.WaitForWorkAround(3000); executionLog.Log("MergeLeadVerifyConfirmation", "Scroll to merge button."); office_LeadsHelper.ScrollDown("//button[@title='Merge']"); executionLog.Log("MergeLeadVerifyConfirmation", "Click on merge button"); office_LeadsHelper.ClickElement("MergeDuplicate"); office_LeadsHelper.WaitForWorkAround(1000); executionLog.Log("MergeLeadVerifyConfirmation", "Accept alert message."); office_LeadsHelper.AcceptAlert(); office_LeadsHelper.WaitForWorkAround(2000); executionLog.Log("MergeLeadVerifyConfirmation", "Verify text on page."); office_LeadsHelper.VerifyPageText("No records are merged"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("MergeLeadVerifyConfirmation"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Merge Lead Verify Confirmation"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Merge Lead Verify Confirmation", "Bug", "Medium", "Leads page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Merge Lead Verify Confirmation"); TakeScreenshot("MergeLeadVerifyConfirmation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MergeLeadVerifyConfirmation.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("MergeLeadVerifyConfirmation"); string id = loginHelper.getIssueID("Merge Lead Verify Confirmation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MergeLeadVerifyConfirmation.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Merge Lead Verify Confirmation"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Merge Lead Verify Confirmation"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("MergeLeadVerifyConfirmation"); executionLog.WriteInExcel("Merge Lead Verify Confirmation", Status, JIRA, "Leads Management"); } }
public void verifyUserBirthdateValidation() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_UserHelper = new Office_UserHelper(GetWebDriver()); // Variable var username1 = "testinguser" + GetRandomNumber(); var fname = "Sales" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyUserBirthdateValidation", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyUserBirthdateValidation", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyUserBirthdateValidation", "Redirect at users page."); VisitOffice("users"); office_UserHelper.WaitForWorkAround(3000); executionLog.Log("VerifyUserBirthdateValidation", "Click on Create button"); office_UserHelper.ClickElement("CreateButton"); office_UserHelper.WaitForWorkAround(3000); executionLog.Log("VerifyUserBirthdateValidation", "Select user type >> 1099 Sales Agent"); office_UserHelper.SelectByText("UserType", "1099 Sales Agent"); office_UserHelper.WaitForWorkAround(2000); executionLog.Log("VerifyUserBirthdateValidation", "Click on Create New radio button"); office_UserHelper.ClickElement("CreateNew"); office_UserHelper.WaitForWorkAround(1000); executionLog.Log("VerifyUserBirthdateValidation", "Enter username"); office_UserHelper.TypeText("UserName", username1); executionLog.Log("VerifyUserBirthdateValidation", "Enter First Name"); office_UserHelper.TypeText("FirstName", fname); executionLog.Log("VerifyUserBirthdateValidation", "Enter Last Name"); office_UserHelper.TypeText("LastName", "Agent"); executionLog.Log("VerifyUserBirthdateValidation", "Enter Birthdate"); office_UserHelper.TypeText("Birthdate", "2017-04-15"); executionLog.Log("VerifyUserBirthdateValidation", "Enter Primary Email"); var email = fname + "@yopmail.com"; office_UserHelper.TypeText("PrimaryEmail", email); executionLog.Log("VerifyUserBirthdateValidation", "Select avatar"); office_UserHelper.ClickElement("SAAvatar"); executionLog.Log("VerifyUserBirthdateValidation", "Click on Save button"); office_UserHelper.ClickElement("Save"); office_UserHelper.WaitForWorkAround(2000); executionLog.Log("VerifyUserBirthdateValidation", "Verify validation for invalid birthday"); office_UserHelper.VerifyPageText("Age should be greater than 18."); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyUserBirthdateValidation"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify User Birthdate Validation"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify User Birthdate Validation", "Bug", "Medium", "Users page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify User Birthdate Validation"); TakeScreenshot("VerifyUserBirthdateValidation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyUserBirthdateValidation.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyUserBirthdateValidation"); string id = loginHelper.getIssueID("Verify User Birthdate Validation"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyUserBirthdateValidation.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify User Birthdate Validation"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify User Birthdate Validation"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyUserBirthdateValidation"); executionLog.WriteInExcel("Verify User Birthdate Validation", Status, JIRA, "Users Management"); } }
public void createTemplate() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); AdminFieldGroupingTemplatesHelper adminHelper = new AdminFieldGroupingTemplatesHelper(GetWebDriver()); // Variable var name = "Testing Subject" + GetRandomNumber(); var email = "Test" + GetRandomNumber() + "@gmail.com"; var TemplateTest = "Template Test" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("AdminFieldGroupingTemplates", "Entering User Name and Password"); Login(username[0], password[0]); executionLog.Log("AdminFieldGroupingTemplates", "Wait"); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminFieldGroupingTemplates", "Verifying Dashboard"); VerifyTitle("Dashboard"); // Visiting Admin Office executionLog.Log("AdminFieldGroupingTemplates", "Redirect at Field Grouping Template"); VisitOffice("field_grouping_templates"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminFieldGroupingTemplates", "Click CreateButton"); adminHelper.ClickElement("CreateButton"); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminFieldGroupingTemplates", "TypeText"); adminHelper.TypeText("TemplateNameField", TemplateTest); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminFieldGroupingTemplates", "Select the client option in module"); adminHelper.SelectText("Module", "Clients"); adminHelper.WaitForWorkAround(4000); executionLog.Log("AdminFieldGroupingTemplates", "Select company details option in Tab"); adminHelper.SelectText("Tab", "Company Details"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminFieldGroupingTemplates", "Click Section"); adminHelper.SelectText("Section", "Company Address"); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminFieldGroupingTemplates", "Click Field"); adminHelper.SelectText("Field", "Address Line 1"); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminFieldGroupingTemplates", "Click AddFieldButton"); adminHelper.ClickElement("AddFieldButton"); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminFieldGroupingTemplates", "Click Save"); adminHelper.ClickElement("Save"); adminHelper.WaitForWorkAround(4000); // Testing the template by mapping a field in an MPA executionLog.Log("AdminFieldGroupingTemplates", "Redirect at PDF Templates page"); VisitOffice("pdf_templates"); executionLog.Log("AdminFieldGroupingTemplates", "Click EditATemplate"); adminHelper.ClickElement("EditPDFMap"); adminHelper.WaitForWorkAround(4000); executionLog.Log("AdminFieldGroupingTemplates", "Click FirstField"); adminHelper.ClickElement("PDFFileFiled"); adminHelper.WaitForWorkAround(1000); executionLog.Log("AdminFieldGroupingTemplates", "Click SelectATemplate"); // adminHelper.ClickElement("SelectATemplate"); executionLog.Log("AdminFieldGroupingTemplates", "Click Tab"); adminHelper.SelectText("Tab", "Company Details"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminFieldGroupingTemplates", "Select the section"); adminHelper.SelectText("Section", "Company Address"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminFieldGroupingTemplates", "Click PegasusFieldOption"); adminHelper.SelectText("PegasusField", "Address Line 1"); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminFieldGroupingTemplates", "Click Map"); adminHelper.ClickElement("Map"); // Saving the Mapping executionLog.Log("AdminFieldGroupingTemplates", "Click SaveMapping"); adminHelper.ClickElement("SaveMapping"); adminHelper.WaitForWorkAround(5000); executionLog.Log("AdminFieldGroupingTemplates", "Click Edit"); adminHelper.ClickElement("EditPDFMap"); executionLog.Log("AdminFieldGroupingTemplates", "Wait"); adminHelper.WaitForWorkAround(5000); // Confimng Mapping has been saved executionLog.Log("AdminFieldGroupingTemplates", "check if Mapping is present "); adminHelper.IsElementPresent("ConfirmMapping"); // Delete Mapping executionLog.Log("AdminFieldGroupingTemplates", "Click Mapping"); adminHelper.ClickElement("ConfirmMapping"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminFieldGroupingTemplates", "Click UndoMapping"); adminHelper.ClickJs("UndoMapping"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminFieldGroupingTemplates", "Redirect at PDF Templates page"); VisitOffice("pdf_templates"); adminHelper.WaitForWorkAround(3000); executionLog.Log("AdminFieldGroupingTemplates", "Click EditATemplate"); adminHelper.ClickElement("FirstPDFTemple"); adminHelper.WaitForWorkAround(3000); // Clone a Template executionLog.Log("AdminFieldGroupingTemplates", "Click CloneTemplate"); adminHelper.ClickJs("CloneTemplate"); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminFieldGroupingTemplates", "Click OK"); adminHelper.AlertOK(); // Delete Cloned Template and Original Template executionLog.Log("AdminFieldGroupingTemplates", "Click Delete"); adminHelper.ClickJs("DeleteClonedTemplate"); executionLog.Log("AdminFieldGroupingTemplates", "Click OK"); adminHelper.AlertOK(); executionLog.Log("AdminFieldGroupingTemplates", "Wait"); adminHelper.WaitForWorkAround(2000); executionLog.Log("AdminFieldGroupingTemplates", "Click Delete"); adminHelper.ClickJs("DeleteTemplate"); executionLog.Log("AdminFieldGroupingTemplates", "Click OK"); adminHelper.AlertOK(); executionLog.Log("AdminFieldGroupingTemplates", "Wait"); adminHelper.WaitForWorkAround(2000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminFieldGroupingTemplates"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Add Partner Association"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Add Partner Association", "Bug", "Medium", "Partner page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Add Partner Association"); TakeScreenshot("AdminFieldGroupingTemplates"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminFieldGroupingTemplates.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminFieldGroupingTemplates"); string id = loginHelper.getIssueID("Add Partner Association"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminFieldGroupingTemplates.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Add Partner Association"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Add Partner Association"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AdminFieldGroupingTemplates"); executionLog.WriteInExcel("Add Partner Association", Status, JIRA, "Partner Portal"); } }
public void meetingValidationForGreaterStartDate() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_MeetingHelper = new OfficeActivities_MeetingHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("MeetingValidationForGreaterStartDate", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("MeetingValidationForGreaterStartDate", "Click on Activities >> Meetings"); VisitOffice("meetings/create"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.TypeText("Subject", "Test Subject"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.TypeText("StartDate", "2015-12-25"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.TypeText("EndDate", "2015-12-09"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.SelectByText("RelatedTo", "Client"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.ClickElement("FindListIcon"); officeActivities_MeetingHelper.WaitForWorkAround(2000); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.ClickElement("SelectClient"); executionLog.Log("OpportunityGroupWithBlankName", "Wait for locator to be present."); officeActivities_MeetingHelper.WaitForElementPresent("Save", 10); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.ClickElement("Save"); executionLog.Log("MeetingValidationForGreaterStartDate", "Verify Page title"); officeActivities_MeetingHelper.VerifyAlertText("Start Date & Time should lesser than or equal to Due Date & Time"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("MeetingValidationForGreaterStartDate"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Meeting Validation For Greater Start Date"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Meeting Validation For Greater Start Date", "Bug", "Medium", "Meetings page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Meeting Validation For Greater Start Date"); TakeScreenshot("MeetingValidationForGreaterStartDate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MeetingValidationForGreaterStartDate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("MeetingValidationForGreaterStartDate"); string id = loginHelper.getIssueID("Meeting Validation For Greater Start Date"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MeetingValidationForGreaterStartDate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Meeting Validation For Greater Start Date"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Meeting Validation For Greater Start Date"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("MeetingValidationForGreaterStartDate"); executionLog.WriteInExcel("Meeting Validation For Greater Start Date", Status, JIRA, "Office Activities"); } }
public void ticketStatusIssue() { string[] username = null; string[] password = null; String JIRA = ""; String Status = "Pass"; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeTickets_CreateTicketsHelper = new OfficeTickets_CreateTicketsHelper(GetWebDriver()); try { executionLog.Log("TicketStatusIssue", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("TicketStatusIssue", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("TicketStatusIssue", "Go to Create Ticket page"); VisitOffice("tickets/create"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("TicketStatusIssue", "Verify title"); VerifyTitle("Create a Ticket"); executionLog.Log("TicketStatusIssue", "Set blank ticket status"); officeTickets_CreateTicketsHelper.SelectByText("TickStatus", "Select Status"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("TicketStatusIssue", "Collapse the Assignment section"); officeTickets_CreateTicketsHelper.ClickElement("TickAssi"); officeTickets_CreateTicketsHelper.WaitForWorkAround(2000); executionLog.Log("TicketStatusIssue", "Enter ticket name"); officeTickets_CreateTicketsHelper.TypeText("TicketName", "Other"); executionLog.Log("TicketStatusIssue", "Click on Assign link"); officeTickets_CreateTicketsHelper.ClickElement("Assign"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("TicketStatusIssue", "Click on Assign user"); officeTickets_CreateTicketsHelper.ClickElement("AssignUser"); executionLog.Log("TicketStatusIssue", "Wait for save button to be visible."); officeTickets_CreateTicketsHelper.WaitForElementPresent("Save", 10); executionLog.Log("TicketStatusIssue", "Click on 'Save' button"); officeTickets_CreateTicketsHelper.ClickElement("Save"); officeTickets_CreateTicketsHelper.WaitForWorkAround(3000); executionLog.Log("TicketStatusIssue", "Verify validation for required status field displayed"); officeTickets_CreateTicketsHelper.verifyElementVisible("TickAssiErr"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("TicketStatusIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Ticket Status Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Ticket Status Issue", "Bug", "Medium", "Ticket page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Ticket Status Issue"); TakeScreenshot("TicketStatusIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TicketStatusIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("TicketStatusIssue"); string id = loginHelper.getIssueID("Ticket Status Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TicketStatusIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Ticket Status Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Ticket Status Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("TicketStatusIssue"); executionLog.WriteInExcel("Ticket Status Issue", Status, JIRA, "Ticketing System"); } }
public void ratesAndFeesCopyCorp() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var corpMasterdata_RatesAndFeesHelper = new CorpMasterdata_RatesAndFeesHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_corp"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var name = "TEST COMPANY" + RandomNumber(1, 9999); var TemplateName = "Test" + GetRandomNumber(); var LastName = "Tester" + RandomNumber(1, 9999); var Number = "12345678" + RandomNumber(10, 9999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("RatesAndFeesCopyCorp", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("RatesAndFeesCopyCorp", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("RatesAndFeesCopyCorp", "Redirect To create rate and fees"); VisitCorp("masterdata/manage_rates_fees"); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000); executionLog.Log("RatesAndFeesCopyCorp", "Verify Page title"); VerifyTitle("Manage Master Rates & Fees"); executionLog.Log("RatesAndFeesCopyCorp", "Enter company name"); corpMasterdata_RatesAndFeesHelper.TypeText("PricingTemplateName", TemplateName); executionLog.Log("RatesAndFeesCopyCorp", "Select Processor Type"); corpMasterdata_RatesAndFeesHelper.SelectByText("ProcessorType", "First Data Omaha"); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(4000); executionLog.Log("RatesAndFeesCopyCorp", "Select Merchant Type"); corpMasterdata_RatesAndFeesHelper.SelectByText("SelectMerchanType", "Ecommerce"); executionLog.Log("RatesAndFeesCopyCorp", "Method of accepting card"); corpMasterdata_RatesAndFeesHelper.Select("MethodOfAcceptingCards", "Ecommerce"); executionLog.Log("RatesAndFeesCopyCorp", "Select Discount Frequency "); corpMasterdata_RatesAndFeesHelper.Select("DiscountFrequency", "Monthly"); executionLog.Log("RatesAndFeesCopyCorp", "Select Debit Network InterFace Pass Through"); corpMasterdata_RatesAndFeesHelper.Select("DebitNetworkInterFacePassThrough", "Yes"); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(2000); executionLog.Log("RatesAndFeesCopyCorp", "Click Edit Rate and Fees"); corpMasterdata_RatesAndFeesHelper.ForceClick("SaveEdit"); executionLog.Log("RatesAndFeesCopyCorp", "Verfy Text The Rates is successfully created!!"); corpMasterdata_RatesAndFeesHelper.WaitForText("The Rates is successfully created!!", 10); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(2000); executionLog.Log("RatesAndFeesCopyCorp", "Search Rate and fee"); corpMasterdata_RatesAndFeesHelper.TypeText("SearchTemp", TemplateName); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(2000); executionLog.Log("RatesAndFeesCopyCorp", "Click On Copy"); corpMasterdata_RatesAndFeesHelper.ClickElement("ClickOnCopy"); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(3000); executionLog.Log("RatesAndFeesCopyCorp", "Verify Page title"); VerifyTitle("Manage Master Rates & Fees"); executionLog.Log("RatesAndFeesCopyCorp", "Save Edit Rate and Fees"); corpMasterdata_RatesAndFeesHelper.ForceClick("SaveEdit"); executionLog.Log("RatesAndFeesCopyCorp", "Verfy Text The Rates is successfully created!!"); corpMasterdata_RatesAndFeesHelper.WaitForText("The Rates is successfully created!!", 10); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(2000); executionLog.Log("RatesAndFeesCopyCorp", "Search Rate and fee"); corpMasterdata_RatesAndFeesHelper.TypeText("SearchTemp", TemplateName); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(2000); executionLog.Log("RatesAndFeesCopyCorp", "Click On Delete"); corpMasterdata_RatesAndFeesHelper.ClickElement("ClickOnDelete"); corpMasterdata_RatesAndFeesHelper.AcceptAlert(); executionLog.Log("RatesAndFeesCopyCorp", "Verify Text"); corpMasterdata_RatesAndFeesHelper.WaitForText("The Rates is successfully deleted!!", 10); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(2000); executionLog.Log("RatesAndFeesCopyCorp", "Search Rate and fee"); corpMasterdata_RatesAndFeesHelper.TypeText("SearchTemp", "Clone of " + TemplateName); corpMasterdata_RatesAndFeesHelper.WaitForWorkAround(2000); executionLog.Log("RatesAndFeesCopyCorp", "Click On Delete"); corpMasterdata_RatesAndFeesHelper.ClickElement("ClickOnDelete"); corpMasterdata_RatesAndFeesHelper.AcceptAlert(); executionLog.Log("RatesAndFeesCopyCorp", "Verify Text"); corpMasterdata_RatesAndFeesHelper.WaitForText("The Rates is successfully deleted!!", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("RatesAndFeesCopyCorp"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Rates And Fees Copy Corp"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Rates And Fees Copy Corp", "Bug", "Medium", "Rate & Fees page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Rates And Fees Copy Corp"); TakeScreenshot("RatesAndFeesCopyCorp"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\RatesAndFeesCopyCorp.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("RatesAndFeesCopyCorp"); string id = loginHelper.getIssueID("Rates And Fees Copy Corp"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\RatesAndFeesCopyCorp.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Rates And Fees Copy Corp"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Rates And Fees Copy Corp"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("RatesAndFeesCopyCorp"); executionLog.WriteInExcel("Rates And Fees Copy Corp", Status, JIRA, "Corp Master Data"); } }
public void verifyNotesCreditsIssue() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); // Variable var name = "Note" + RandomNumber(1, 99); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyNotesCreditsIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyNotesCreditsIssue", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyNotesCreditsIssue", "Redirect at admin page."); VisitOffice("admin"); executionLog.Log("VerifyNotesCreditsIssue", "Go to notes page"); VisitOffice("notes"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("VerifyNotesCreditsIssue", "Verify page title"); VerifyTitle("Notes"); executionLog.Log("VerifyNotesCreditsIssue", "Click on any notes."); officeActivities_NotesHelper.ClickElement("ClickOnNotes"); executionLog.Log("VerifyNotesCreditsIssue", "Wait for locator to be present."); officeActivities_NotesHelper.WaitForElementPresent("CreatedBy", 10); executionLog.Log("VerifyNotesCreditsIssue", "Verify notes created by credits"); officeActivities_NotesHelper.VerifyText("CreatedBy", "Howard Tang"); executionLog.Log("VerifyNotesCreditsIssue", "Verify notes Modified by credits"); officeActivities_NotesHelper.VerifyText("ModifiedBy", "Howard Tang"); executionLog.Log("VerifyNotesCreditsIssue", "Logout from the application."); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyNotesCreditsIssue"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Notes Credits Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Notes Credits Issue", "Bug", "Medium", "Notes page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Notes Credits Issue"); TakeScreenshot("VerifyNotesCreditsIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNotesCreditsIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyNotesCreditsIssue"); string id = loginHelper.getIssueID("Verify Notes Credits Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyNotesCreditsIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Notes Credits Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Notes Credits Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyNotesCreditsIssue"); executionLog.WriteInExcel("Verify Notes Credits Issue", Status, JIRA, "Office Activities"); } }
public void ticketIssue() { string[] username = null; string[] password = null; String JIRA = ""; String Status = "Pass"; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeTickets_AllTicketsHelper = new OfficeTickets_AllTicketsHelper(GetWebDriver()); try { executionLog.Log("TicketIssue", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("TicketIssue", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("TicketIssue", "Go to open Ticket page"); VisitOffice("ticket-search/open"); executionLog.Log("TicketIssue", "Verify title"); VerifyTitle("Tickets"); executionLog.Log("TicketIssue", "Get first ticket id"); string id = officeTickets_AllTicketsHelper.getText("TickID"); executionLog.Log("TicketIssue", "Go to closed Ticket page"); VisitOffice("ticket-search/closed"); executionLog.Log("TicketIssue", "Verify title"); VerifyTitle("Tickets"); executionLog.Log("TicketIssue", "Verify ticket not available"); officeTickets_AllTicketsHelper.WaitForWorkAround(3000); executionLog.Log("TicketIssue", "Go to resolved Ticket page"); VisitOffice("ticket-search/resolved"); executionLog.Log("TicketIssue", "Verify title"); VerifyTitle("Tickets"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("TicketIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Ticket Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Ticket Issue", "Bug", "Medium", "Ticket page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Ticket Issue"); TakeScreenshot("TicketIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TicketIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("TicketIssue"); string id = loginHelper.getIssueID("Ticket Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TicketIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Ticket Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Ticket Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("TicketIssue"); executionLog.WriteInExcel("Ticket Issue", Status, JIRA, "Ticketing System"); } }
public void setFormatToEmail() { string[] username = null; string[] password = null; DateTime date = new DateTime(); XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var email = new AdminSetFormatFieldsHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); //Random Variable String JIRA = ""; String Status = "Pass"; var DBAName = "DBA@Company" + RandomNumber(1, 999); try { //executionLog.Log("AdminSetFormatEmail", "WaitForWorkAround"); //email.WaitForWorkAround(2000); //Logging in executionLog.Log("AdminSetFormatEmail", "Login"); Login(username[0], password[0]); //executionLog.Log("AdminSetFormatEmail", "WaitForWorkAround"); //email.WaitForWorkAround(4000); executionLog.Log("AdminSetFormatEmail", "Verify Title"); VerifyTitle("Dashboard"); //email.WaitForWorkAround(3000); // Going to admin office //executionLog.Log("AdminSetFormatEmail", "Visit office"); //VisitOffice("admin"); // Accessing field in field dictionary VisitOffice("fields"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Select module as clients"); email.SelectByText("Module", "Clients"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Processor as First Data North"); email.SelectByText("Processor", "First Data North"); //email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Tab as Contacts"); email.SelectByText("Tab", "Contacts"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Section as Contacts"); email.SelectByText("Section", "Contacts"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click Search"); email.ClickElement("Search"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Type Text"); email.TypeText("filter", "Title"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click TitleField"); email.ClickElement("ContactTitle"); email.WaitForWorkAround(4000); executionLog.Log("AdminSetFormatEmail", "Click FieldFormat"); email.checkAndClick("ProcFieldFormat"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatPhone", "Select data type as phone."); email.SelectByText("ProcFieldContntType", "Email"); //email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click SaveFieldManager"); email.ClickElement("SaveFieldManager"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Redirect at Create Client"); VisitOffice("clients/create"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Select Processor"); office_ClientsHelper.SelectByText("CreateProc", "First Data North"); executionLog.Log("AdminSetFormatEmail", "Enter Client Dba Name"); office_ClientsHelper.TypeText("ClientDBAName", DBAName); executionLog.Log("AdminSetFormatEmail", "Select client status"); office_ClientsHelper.SelectByText("ClientStatus", "New"); executionLog.Log("AdminSetFormatEmail", "Select Client Res[onsibility."); office_ClientsHelper.SelectByText("ClientResponsibility", "Howard Tang"); executionLog.Log("AdminSetFormatEmail", "Click on next button"); office_ClientsHelper.ClickElement("Next"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Wait for confirmation message."); office_ClientsHelper.WaitForText("Client saved successfully. ", 10); executionLog.Log("AdminSetFormatEmail", "Click On Contact Tab Clinet"); office_ClientsHelper.ClickElement("ContactDetails"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Enter the text"); email.TypeText("Title", "Tester01"); email.ClickForce("Save"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Verify the Email Format Validation"); email.VerifyText("FieldFormatEmailError", "Please enter a valid email address."); executionLog.Log("AdminSetFormatEmail", "Redirect To clients page. "); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select client by check box"); office_ClientsHelper.ClickElement("ClickOn1stOpp"); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteClient"); executionLog.Log("AdminSetFormatEmail", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminSetFormatEmail", "Wait for success message."); office_ClientsHelper.WaitForText("1 records deleted successfully", 10); executionLog.Log("AdminSetFormatEmail", "Redirect To client recycle bin page. "); VisitOffice("clients/recyclebin"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Enter Company Name"); office_ClientsHelper.TypeText("SearchClient", DBAName); office_ClientsHelper.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click on delete client"); office_ClientsHelper.ClickElement("DeleteRbin"); executionLog.Log("AdminSetFormatEmail", "Accept alert message."); office_ClientsHelper.AcceptAlert(); executionLog.Log("AdminSetFormatEmail", "Wait for success message."); office_ClientsHelper.WaitForText("Client Permanently Deleted.", 10); // Accessing field in field dictionary VisitOffice("fields"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Select module as clients"); email.SelectByText("Module", "Clients"); email.WaitForWorkAround(1000); executionLog.Log("AdminSetFormatEmail", "Select Processor as First Data North"); email.SelectByText("Processor", "First Data North"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Tab as Contacts"); email.SelectByText("Tab", "Contacts"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Select Section as Contacts"); email.SelectByText("Section", "Contacts"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click Search"); email.ClickElement("Search"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Type text"); email.TypeText("filter", "Title"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Click TitleField"); email.ClickElement("ContactTitle"); email.WaitForWorkAround(3000); executionLog.Log("AdminSetFormatEmail", "Click FieldFormat"); email.ClickElement("ProcFieldFormat"); email.WaitForWorkAround(2000); executionLog.Log("AdminSetFormatEmail", "Click SaveFieldManager"); email.ClickElement("SaveFieldManager"); email.WaitForWorkAround(3000); } catch (Exception e) { Console.WriteLine(date.TimeOfDay.Duration()); executionLog.Log("Error", e.StackTrace); Status = "Fail"; Console.WriteLine(date.TimeOfDay.Duration()); String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AdminSetFormatEmail"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } Console.WriteLine(date.TimeOfDay.Duration()); bool result = loginHelper.CheckExstingIssue("Admin Set Format Email"); Console.WriteLine(date.TimeOfDay.Duration()); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Admin Set Format Email Helper", "Bug", "Medium", "Client page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Admin Set Format Email"); TakeScreenshot("AdminSetFormatEmail"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminSetFormatEmail.png"; loginHelper.AddAttachment(location, id); } Console.WriteLine(date.TimeOfDay.Duration()); } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AdminSetFormatEmail"); string id = loginHelper.getIssueID("Admin Set Format Email"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AdminSetFormatEmail.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Admin Set Format Email"), "This issue is still occurring"); } Console.WriteLine(date.TimeOfDay.Duration()); } JIRA = loginHelper.getIssueID("Admin Set Format Email"); Console.WriteLine(date.TimeOfDay.Duration()); //executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("Admin Set Format Email"); Console.WriteLine(date.TimeOfDay.Duration()); executionLog.WriteInExcel("Admin Set Format Email", Status, JIRA, "Partner Portal"); } }
public void partnerAssociationURLChange() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var agent_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver()); // Variable String JIRA = ""; String Status = "Pass"; try { executionLog.Log("PartnerAssociationURLChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("PartnerAssociationURLChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("PartnerAssociationURLChange", "Goto User Agents >> Partner Association"); VisitOffice("partners/associations"); executionLog.Log("PartnerAssociationURLChange", "Click On Partner Association"); agent_PartnerAssociationHelper.ClickElement("ClickOnPartnerAssociation"); agent_PartnerAssociationHelper.WaitForWorkAround(2000); executionLog.Log("PartnerAssociationURLChange", "Change the url with the url number of another office"); VisitOffice("partners/association/view/197"); executionLog.Log("PartnerAssociationURLChange", "Verify Validation"); agent_PartnerAssociationHelper.WaitForText("You don't have privilege.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("PartnerAssociationURLChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Partner Association URL Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Partner Association URL Change", "Bug", "Medium", "Partner Association page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Partner Association URL Change"); TakeScreenshot("PartnerAssociationURLChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PartnerAssociationURLChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("PartnerAssociationURLChange"); string id = loginHelper.getIssueID("Partner Association URL Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PartnerAssociationURLChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Partner Association URL Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Partner Association URL Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("PartnerAssociationURLChange"); executionLog.WriteInExcel("Partner Association URL Change", Status, JIRA, "Office Agents"); } }
public void editMyProfile() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_MyProfileHelper = new Office_MyProfileHelper(GetWebDriver()); // VARIABLE String Status = "Pass"; String JIRA = ""; try { executionLog.Log("EditMyProfile", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditMyProfile", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("EditMyProfile", "Redirect to my profile"); VisitOffice("myprofile"); office_MyProfileHelper.WaitForWorkAround(5000); executionLog.Log("EditMyProfile", "Click On EditProfile"); office_MyProfileHelper.ClickElement("EditProfile"); office_MyProfileHelper.WaitForWorkAround(5000); executionLog.Log("EditMyProfile", "Enter Zip Code"); office_MyProfileHelper.TypeText("ZipCode", "60601"); office_MyProfileHelper.WaitForWorkAround(3000); executionLog.Log("EditMyProfile", "Click on save button"); office_MyProfileHelper.ClickElement("Save"); executionLog.Log("EditMyProfile", "Verify Your profile has been successfully updated. "); office_MyProfileHelper.WaitForText("Your profile has been successfully updated.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditMyProfile"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit My Profile"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Edit My Profile", "Bug", "Medium", "Profile page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Edit My Profile"); TakeScreenshot("EditMyProfile"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditMyProfile.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditMyProfile"); string id = loginHelper.getIssueID("Edit My Profile"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditMyProfile.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit My Profile"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit My Profile"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditMyProfile"); executionLog.WriteInExcel("Edit My Profile", Status, JIRA, "My Profile"); } }
public void pickListPopup() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var system_PicklistsHelper = new System_PicklistsHelper(GetWebDriver()); // Variable var Picklist = "Pick" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("PickListPopup", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("PickListPopup", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("PickListPopup", "Go to picklist page"); VisitOffice("pick-lists"); system_PicklistsHelper.WaitForWorkAround(3000); executionLog.Log("PickListPopup", "Verify title"); VerifyTitle("Picklists"); executionLog.Log("PickListPopup", " Open the first picklist"); system_PicklistsHelper.ClickElement("EditPick"); system_PicklistsHelper.WaitForWorkAround(3000); executionLog.Log("PickListPopup", "Veirfy title"); VerifyTitle("Add/Edit Picklist Items"); executionLog.Log("PickListPopup", "Click on Add button"); system_PicklistsHelper.ClickElement("AddPick"); system_PicklistsHelper.WaitForWorkAround(2000); executionLog.Log("PickListPopup", "Enter pick list name"); system_PicklistsHelper.TypeText("PickType", Picklist); executionLog.Log("PickListPopup", "Click on Save button"); system_PicklistsHelper.ClickElement("Save"); executionLog.Log("PickListPopup", "Wait for text"); // system_PicklistsHelper.WaitForText("The picklist value is added successfully", 10); executionLog.Log("PickListPopup", "Verify 'Add Another message' is present"); system_PicklistsHelper.verifyElementPresent("AddAnoth"); executionLog.Log("PickListPopup", "Click on Cancel"); system_PicklistsHelper.ClickElement("Cancel"); system_PicklistsHelper.WaitForWorkAround(2000); executionLog.Log("PickListPopup", "Verfiy Text"); system_PicklistsHelper.VerifyPageText(Picklist); executionLog.Log("PickListPopup", "Click delete Button"); system_PicklistsHelper.ClickElement("DeletePick"); system_PicklistsHelper.WaitForWorkAround(3000); executionLog.Log("PickListPopup", "Click on item to deleted"); system_PicklistsHelper.DeletePickList(Picklist); executionLog.Log("PickListPopup", "Selelct replace with item."); system_PicklistsHelper.SelectText("ReplacePiclist", "Other"); executionLog.Log("PickListPopup", "Click PickList Save Button"); system_PicklistsHelper.ClickElement("PickListSaveBtn"); executionLog.Log("PickListPopup", "Accept alert message."); system_PicklistsHelper.AcceptAlert(); system_PicklistsHelper.WaitForWorkAround(3000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("PickListPopup"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Pick List Popup"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Pick List Popup", "Bug", "Medium", "Pick List page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Pick List Popup"); TakeScreenshot("PickListPopup"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PickListPopup.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("PickListPopup"); string id = loginHelper.getIssueID("Pick List Popup"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PickListPopup.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Pick List Popup"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Pick List Popup"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("PickListPopup"); executionLog.WriteInExcel("Pick List Popup", Status, JIRA, "System"); } }
public void addressTypePickList() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_MyProfileHelper = new Office_MyProfileHelper(GetWebDriver()); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("AddressTypePickList", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("AddressTypePickList", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("AddressTypePickList", "Go to profile page"); VisitOffice("myprofile"); executionLog.Log("AddressTypePickList", "Verify title"); VerifyTitle("My Profile"); executionLog.Log("AddressTypePickList", "Click on 'Edit' profile button"); office_MyProfileHelper.ClickElement("AddressEdit"); executionLog.Log("AddressTypePickList", "Verify Title"); VerifyTitle("Edit Profile"); executionLog.Log("AddressTypePickList", "Verify Address type not a pick list"); office_MyProfileHelper.verifyElementPresent("AddressTypeDropdown"); executionLog.Log("AddressTypePickList", "Log out from the application"); VisitOffice("logout"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("AddressTypePickList"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Address Type Pick List"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Address Type Pick List", "Bug", "Medium", "Profile page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Address Type Pick List"); TakeScreenshot("AddressTypePickList"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AddressTypePickList.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("AddressTypePickList"); string id = loginHelper.getIssueID("Address Type Pick List"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\AddressTypePickList.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Address Type Pick List"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Address Type Pick List"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("AddressTypePickList"); executionLog.WriteInExcel("Address Type Pick List", Status, JIRA, "My Profile"); } }
public void verifyDocumentShareDBAPopulate() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_clientsHelper = new Office_ClientsHelper(GetWebDriver()); var yopmail_Helper = new YopMailHelper(GetWebDriver()); var DBA = "ClientDBA" + RandomNumber(1, 9999); var OwnerFirst = "Owner" + RandomNumber(1, 9999); var OwnerLast = "Test" + RandomNumber(1, 9999); var DBAVerify = "Merchant Portal - " + DBA + " You have documents waiting for review"; // Variable random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyDocumentShareDBAPopulate", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("VerifyDocumentShareDBAPopulate", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected to Dashboard"); VisitOffice("clients/create"); office_clientsHelper.WaitForWorkAround(2000); Console.WriteLine("Redirected to Create Merchant page"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Bussiness DBA name"); office_clientsHelper.TypeText("ClientDBAName", DBA); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter First Name"); office_clientsHelper.TypeText("FirstName", "Test"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Last Name"); office_clientsHelper.TypeText("LastName", "Client"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Status"); office_clientsHelper.SelectByText("Status", "New"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Responsibility"); office_clientsHelper.SelectByText("Responsibility", "Howard Tang"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Save button"); office_clientsHelper.ClickElement("Save"); office_clientsHelper.WaitForWorkAround(4000); Console.WriteLine("Merchant Created"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to Owners tab"); office_clientsHelper.ClickElement("OwnerTab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to Owners tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Owner First Name"); office_clientsHelper.TypeText("OwnerFirstName", OwnerFirst); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Owner Last Name"); office_clientsHelper.TypeText("OwnerLastName", OwnerLast); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Owner Title"); office_clientsHelper.TypeText("TitleOwner", "NewTitle"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select eAddress Type"); office_clientsHelper.SelectByText("OwnereAddressType", "E-Mail"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter eAddress"); office_clientsHelper.TypeText("OwnereAddressEnter", "*****@*****.**"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Save button"); office_clientsHelper.ClickElement("OwnerSave"); Console.WriteLine("Owner Information saved"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to PDFs tab"); office_clientsHelper.ClickElement("PDFtab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to PDFs tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on [Share] link"); office_clientsHelper.ClickElement("ShareLink"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Default Password radio button"); office_clientsHelper.ClickElement("DefaultPwdRadioBtn"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Create button"); office_clientsHelper.ClickElement("CreateBtn"); office_clientsHelper.WaitForWorkAround(3000); GetWebDriver().SwitchTo().Alert().Accept(); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Close Create User Popup"); office_clientsHelper.ClickElement("CrossIcon"); Console.WriteLine("Client User Created"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to Info tab"); office_clientsHelper.ClickElement("InfoTab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to Info tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Create/Manage button"); office_clientsHelper.ClickForce("ManageClientUser"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Manage option"); office_clientsHelper.ClickElement("ManageOption"); office_clientsHelper.WaitForWorkAround(1000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select User"); office_clientsHelper.ClickElement("ClientChkBox"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Activate Selected User button"); office_clientsHelper.ClickElement("ActivateBtn"); office_clientsHelper.WaitForWorkAround(4000); GetWebDriver().SwitchTo().Alert().Accept(); office_clientsHelper.WaitForWorkAround(4000); Console.WriteLine("Client User Activated"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to PDFs tab"); office_clientsHelper.ClickElement("PDFtab"); office_clientsHelper.WaitForWorkAround(3000); Console.WriteLine("Redirected to PDFs tab"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on [Share] link"); office_clientsHelper.ClickElement("ShareLink"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Owners Signature Required check box"); office_clientsHelper.ClickElement("OwnerSignReq"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Select Documents Required check box"); office_clientsHelper.ClickElement("DocReq"); office_clientsHelper.WaitForWorkAround(3000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Share button"); office_clientsHelper.ClickElement("ShareBtn"); office_clientsHelper.WaitForWorkAround(3000); GetWebDriver().SwitchTo().Alert().Accept(); Console.WriteLine("File Shared successfully"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Go to yopmail.com"); GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/"); yopmail_Helper.WaitForWorkAround(3000); Console.WriteLine("Redirected to yopmail.com"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Enter Email"); yopmail_Helper.TypeText("Yopmail", "owner.pegasus"); yopmail_Helper.WaitForWorkAround(1000); executionLog.Log("VerifyDocumentShareDBAPopulate", "Click on Check Inbox button"); yopmail_Helper.ClickElement("YopmailClick"); Console.WriteLine("Entered into inbox"); executionLog.Log("VerifyDocumentShareDBAPopulate", "Verify DBA Name present in Subject of email"); yopmail_Helper.switchFrame("ifmail"); yopmail_Helper.VerifyText("SubjectFirstMail", DBA); Console.WriteLine("DBA Name is populated in Subject if email"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyDocumentShareDBAPopulate"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Document Share DBA Populate"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Document Share DBA Populate", "Bug", "Medium", "Office Merchant", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Admin Ticket Master Delete Confirmation"); TakeScreenshot("VerifyDocumentShareDBAPopulate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDocumentShareDBAPopulate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyDocumentShareDBAPopulate"); string id = loginHelper.getIssueID("Verify Document Share DBA Populate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyDocumentShareDBAPopulate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Document Share DBA Populate"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Document Share DBA Populate"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyDocumentShareDBAPopulate"); executionLog.WriteInExcel("Verify Document Share DBA Populate", Status, JIRA, "Office Merchant"); } }
public void emailNoteWithRelatedTo() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var officeActivities_NotesHelper = new OfficeActivities_NotesHelper(GetWebDriver()); // Variable random var Subject = "Subject" + RandomNumber(1, 999); String Status = "Pass"; String JIRA = ""; try { executionLog.Log("EmailNoteWithRelatedTo", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EmailNoteWithRelatedTo", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("EmailNoteWithRelatedTo", "Redirect To notes"); VisitOffice("notes"); executionLog.Log("EmailNoteWithRelatedTo", "Click on Create "); officeActivities_NotesHelper.ClickElement("Create"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("EmailNoteWithRelatedTo", "Enter Note Subject"); officeActivities_NotesHelper.TypeText("Subject", Subject); executionLog.Log("EmailNoteWithRelatedTo", "Select Client"); officeActivities_NotesHelper.SelectDropDownByText("//*[@id='NoteParentType']", "Client"); executionLog.Log("EmailNoteWithRelatedTo", "ClickIconToSelectClient"); officeActivities_NotesHelper.ClickElement("SelectClient"); officeActivities_NotesHelper.WaitForWorkAround(3000); executionLog.Log("EmailNoteWithRelatedTo", "Click On Client"); officeActivities_NotesHelper.ClickElement("ClickONClientNS"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteWithRelatedTo", "Click on Save button"); officeActivities_NotesHelper.ClickElement("Save"); officeActivities_NotesHelper.WaitForWorkAround(6000); executionLog.Log("EmailNoteWithRelatedTo", "Click On Notes"); officeActivities_NotesHelper.ClickElement("ClickOnNotes"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteWithRelatedTo", "Click on Email Note"); officeActivities_NotesHelper.ClickElement("EmailNote"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("EmailNoteWithRelatedTo", "Verify selected client."); officeActivities_NotesHelper.VerifyText("VerifySelectedClient", "Client"); executionLog.Log("AddNotesAdmin", "Redirect at notes page."); VisitOffice("notes"); executionLog.Log("AddNotesAdmin", "Redirect at notes page."); officeActivities_NotesHelper.WaitForElementPresent("EnterSubject", 10); executionLog.Log("AddNotesAdmin", "Search subject by note"); officeActivities_NotesHelper.TypeText("EnterSubject", Subject); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AddNotesAdmin", "Select All in created by field"); officeActivities_NotesHelper.SelectByText("CreatedbyField", "All"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AddNotesAdmin", "Search subject by note"); officeActivities_NotesHelper.ClickElement("SelectNote1"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AddNotesAdmin", "Click on delete note."); officeActivities_NotesHelper.ClickElement("DeleteNote"); officeActivities_NotesHelper.WaitForWorkAround(2000); executionLog.Log("AddNotesAdmin", "Accept alert message."); officeActivities_NotesHelper.AcceptAlert(); executionLog.Log("AddNotesAdmin", "Wait for delete text"); officeActivities_NotesHelper.WaitForText("Note deleted successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EmailNoteWithRelatedTo"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Email Note With Related To"); Console.WriteLine("Stepp 2 after existing"); if (!result) { if (Int16.Parse(counter) < 15) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssueTest("Email Note With Related To", "Bug", "Medium", "Email note page", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Email Note With Related To"); TakeScreenshot("EmailNoteWithRelatedTo"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EmailNoteWithRelatedTo.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 15) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EmailNoteWithRelatedTo"); string id = loginHelper.getIssueID("Email Note With Related To"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EmailNoteWithRelatedTo.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Email Note With Related To"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Email Note With Related To"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EmailNoteWithRelatedTo"); executionLog.WriteInExcel("Email Note With Related To", Status, JIRA, "Email Actitvities"); } }
public void editPDFImportWizard() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var pDFTemplate_ImportWizardHelper = new PDFTemplate_ImportWizardHelper(GetWebDriver()); // Variable String pdf = "sample" + GetRandomNumber() + ".pdf"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("EditPDFImportWizard", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("EditPDFImportWizard", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("EditPDFImportWizard", "Click On Admin"); VisitOffice("admin"); executionLog.Log("EditPDFImportWizard", "Redirect Import Wizard"); VisitOffice("pdf_templates/import"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("EditPDFImportWizard", "Verify title"); VerifyTitle("PDF Import Wizard"); executionLog.Log("EditPDFImportWizard", "Choose Module"); pDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients"); executionLog.Log("EditPDFImportWizard", "Upload PDF File"); String filename = GetPathToFile() + "2.PDF"; pDFTemplate_ImportWizardHelper.upload("SelectFile", filename); executionLog.Log("EditPDFImportWizard", "Click On Import"); pDFTemplate_ImportWizardHelper.ClickElement("Import"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("EditPDFImportWizard", "Click On Next"); pDFTemplate_ImportWizardHelper.ClickElement("Next"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("EditPDFImportWizard", "verify title"); VerifyTitle("PDF Import Wizard"); executionLog.Log("EditPDFImportWizard", "Select Category"); pDFTemplate_ImportWizardHelper.SelectByText("Category", "Other"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("EditPDFImportWizard", "Click on Save button"); pDFTemplate_ImportWizardHelper.ClickElement("Save1"); executionLog.Log("EditPDFImportWizard", "wait for text"); pDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10); executionLog.Log("EditPDFImportWizard", "Click On Edit"); pDFTemplate_ImportWizardHelper.ClickElement("Edit"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("EditPDFImportWizard", "Verify title"); VerifyTitle("Edit PDF Template"); executionLog.Log("EditPDFImportWizard", "Enter Name"); pDFTemplate_ImportWizardHelper.TypeText("Name", "Test.pdf"); executionLog.Log("EditPDFImportWizard", "Click Edit Save"); pDFTemplate_ImportWizardHelper.ClickElement("SaveEdit"); executionLog.Log("EditPDFImportWizard", "Wait for updation message."); pDFTemplate_ImportWizardHelper.WaitForText("PDF Template Updated Successfully.", 10); executionLog.Log("EditPDFImportWizard", "Redirect Import Wizard"); VisitOffice("pdf_templates"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("EditPDFImportWizard", "Click Delete btn "); pDFTemplate_ImportWizardHelper.ClickElement("CheckBox1"); executionLog.Log("EditPDFImportWizard", "Click Delete btn "); pDFTemplate_ImportWizardHelper.ClickElement("DeletePDF"); executionLog.Log("EditPDFImportWizard", "Accept alert message. "); pDFTemplate_ImportWizardHelper.AcceptAlert(); executionLog.Log("EditPDFImportWizard", "Wait for message "); pDFTemplate_ImportWizardHelper.WaitForText("PDF Template Deleted Successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("EditPDFImportWizard"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Edit PDF Import Wizard"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Edit PDF Import Wizard", "Bug", "Medium", "PDF Import page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Edit PDF Import Wizard"); TakeScreenshot("EditPDFImportWizard"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditPDFImportWizard.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("EditPDFImportWizard"); string id = loginHelper.getIssueID("Edit PDF Import Wizard"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\EditPDFImportWizard.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Edit PDF Import Wizard"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Edit PDF Import Wizard"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("EditPDFImportWizard"); executionLog.WriteInExcel("Edit PDF Import Wizard", Status, JIRA, "PDF Import"); } }
public void verifyOpportunityCreateFormTabs() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_OpportunitiesHelper = new Office_OpportunitiesHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var Oppname = "Test" + RandomNumber(99, 99999); var CDBA = "New" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyOpportunityCreateFormTabs", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("VerifyOpportunityCreateFormTabs", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyOpportunityCreateFormTabs", "Create Opportunities"); VisitOffice("opportunities/create"); executionLog.Log("VerifyOpportunityCreateFormTabs", "Verify page title as create opportunity "); VerifyTitle("Create an Opportunity"); executionLog.Log("VerifyOpportunityCreateFormTabs", "Verify section details present"); office_OpportunitiesHelper.verifyElementPresent("Details"); executionLog.Log("VerifyOpportunityCreateFormTabs", "Verify label opportunity name present."); office_OpportunitiesHelper.verifyElementPresent("OpportunityName"); executionLog.Log("VerifyOpportunityCreateFormTabs", "Verify label company name present."); office_OpportunitiesHelper.verifyElementPresent("CompanyName"); executionLog.Log("VerifyOpportunityCreateFormTabs", "Verify assignment section present."); office_OpportunitiesHelper.verifyElementPresent("HAssignments"); executionLog.Log("VerifyOpportunityCreateFormTabs", "Verify label status present."); office_OpportunitiesHelper.verifyElementPresent("LabelStatus"); executionLog.Log("VerifyOpportunityCreateFormTabs", "Verify label responsibility present."); office_OpportunitiesHelper.verifyElementPresent("LabelResponsibility"); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyOpportunityCreateFormTabs"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("VerifyOpportunityCreateFormTabs"); if (!result) { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Opportunities", "Bug", "Medium", "Opportunity page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("VerifyOpportunityCreateFormTabs"); TakeScreenshot("VerifyOpportunityCreateFormTabs"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyOpportunityCreateFormTabs.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 5) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyOpportunityCreateFormTabs"); string id = loginHelper.getIssueID("VerifyOpportunityCreateFormTabs"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyOpportunityCreateFormTabs.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("VerifyOpportunityCreateFormTabs"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("VerifyOpportunityCreateFormTabs"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyOpportunityCreateFormTabs"); executionLog.WriteInExcel("VerifyOpportunityCreateFormTabs", Status, JIRA, "Opportunity management"); } }
public void pDFCategoriesViewInOffice() { string[] username = null; string[] password = null; string[] username1 = null; string[] password1 = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_corp"); password = oXMLData.getData("settings/Credentials", "password"); username1 = oXMLData.getData("settings/Credentials", "username_office"); password1 = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var corp_PDFTemplate_PDFCategoriesHelper = new CorpPDFTemplate_CategoriesHelper(GetWebDriver()); // Variable random String name = "Test" + GetRandomNumber(); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("PDFCategoriesViewInOffice", "Enter User name"); Login(username[0], password[0]); Console.WriteLine("Logged in as " + username[0] + " / " + password[0]); executionLog.Log("PDFCategoriesViewInOffice", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("PDFCategoriesViewInOffice", "Redirect Template"); VisitCorp("pdf_templates/categories"); corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(1000); executionLog.Log("PDFCategoriesViewInOffice", "Click on create button"); corp_PDFTemplate_PDFCategoriesHelper.ClickElement("Create"); corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(2000); executionLog.Log("PDFCategoriesViewInOffice", "Enter Name"); corp_PDFTemplate_PDFCategoriesHelper.TypeText("EnterName", name); executionLog.Log("PDFCategoriesViewInOffice", "Click on Save Button"); corp_PDFTemplate_PDFCategoriesHelper.ClickDisplayed("//a[@title='Save']"); executionLog.Log("PDFCategoriesViewInOffice", "Verify text present"); corp_PDFTemplate_PDFCategoriesHelper.WaitForText("Category Created Successfully", 10); executionLog.Log("PDFCategoriesViewInOffice", "Redirect To logout"); VisitCorp("logout"); corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFCategoriesViewInOffice", "Login using office credentials"); Login(username1[0], password[0]); executionLog.Log("PartnerAgentWithoutUserSuccessConfirm", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("PDFCategoriesViewInOffice", "Redirect To Admin"); VisitOffice("admin"); corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(4000); executionLog.Log("PDFCategoriesViewInOffice", "Reirect to PDF Category"); VisitOffice("pdf_templates/categories"); corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFCategoriesViewInOffice", "Verify category on office page. "); corp_PDFTemplate_PDFCategoriesHelper.VerifyPageText(name); corp_PDFTemplate_PDFCategoriesHelper.WaitForWorkAround(4000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("PDFCategoriesViewInOffice"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("PDF Categories View In Office"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("PDF Categories View In Office", "Bug", "Medium", "PDF Template page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("PDF Categories View In Office"); TakeScreenshot("PDFCategoriesViewInOffice"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PDFCategoriesViewInOffice.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("PDFCategoriesViewInOffice"); string id = loginHelper.getIssueID("PDF Categories View In Office"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PDFCategoriesViewInOffice.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("PDF Categories View In Office"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("PDF Categories View In Office"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("PDFCategoriesViewInOffice"); executionLog.WriteInExcel("PDF Categories View In Office", Status, JIRA, "Corp PDF Templates"); } }
public void mergeContact() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ContactsHelper = new Office_ContactsHelper(GetWebDriver()); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Variable var FName = "Test" + RandomNumber(99, 99999); var LName = "Test" + RandomNumber(99, 99999); var CDBA = "New" + RandomNumber(99, 99999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("MergeContact", "Login with valid credential Username"); Login(username[0], password[0]); executionLog.Log("MergeContact", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("MergeContact", "Goto Contact"); VisitOffice("contacts"); executionLog.Log("MergeContact", "Veify Title Contact"); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); executionLog.Log("MergeContact", "Goto Create Contact page."); VisitOffice("contacts/create"); executionLog.Log("MergeContact", "Click on Cancel"); office_ContactsHelper.ClickElement("Cancelbtn"); executionLog.Log("MergeContact", "Verify Title Contact"); office_ContactsHelper.VerifyText("VerifyContact", "Contacts"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("MergeContact", "Create Contact"); VisitOffice("contacts/create"); executionLog.Log("MergeContact", "Enter First Name"); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("MergeContact", "Enter Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("MergeContact", "Enter Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("MergeContact", "Click Save Button"); office_ContactsHelper.ClickElement("SaveContactN"); executionLog.Log("MergeContact", "Wait for Confirmation"); office_ContactsHelper.WaitForText("A Contact has been created.", 10); executionLog.Log("MergeContact", "Goto Create Contact"); VisitOffice("contacts/create"); executionLog.Log("MergeContact", "Enter First Name"); office_ContactsHelper.TypeText("FirstNAME", FName); executionLog.Log("MergeContact", "Enter Last Name"); office_ContactsHelper.TypeText("LastName", LName); executionLog.Log("MergeContact", "Enter Company DBA Name"); office_ContactsHelper.TypeText("CompanyName", CDBA); executionLog.Log("MergeContact", "Save Contact"); office_ContactsHelper.ClickElement("SaveContactN"); office_ContactsHelper.WaitForWorkAround(3000); if (office_ContactsHelper.IsElementPresent("//h3[text()='Existing Contacts']")) { executionLog.Log("MergeContact", "Click on Dublicate"); office_ContactsHelper.ClickElement("ClickOnDuplicate"); executionLog.Log("MergeContact", "Confirmation"); office_ContactsHelper.WaitForText("A Contact has been created.", 10); executionLog.Log("MergeContact", "Visit Contact"); VisitOffice("contacts"); executionLog.Log("MergeContact", "Select 1st contact"); office_ContactsHelper.ClickElement("SelectIstContact"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("MergeContact", "Select 2nd contact"); office_ContactsHelper.ClickElement("Select2ndContact"); office_ContactsHelper.WaitForWorkAround(1000); executionLog.Log("MergeContact", "Click on merge records."); office_ContactsHelper.ClickElement("MergeRecordContact"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("MergeContact", "Select Primary Contact."); office_ContactsHelper.ClickElement("SelectCompContact"); office_ContactsHelper.WaitForWorkAround(2000); executionLog.Log("MergeContact", "Click On Merge"); office_ContactsHelper.ClickElement("ClickOnMergeBtn"); office_ContactsHelper.AcceptAlert(); executionLog.Log("MergeContact", "Wait for success message."); office_ContactsHelper.WaitForText("Merging Contact(s) Completed Successfully.", 10); } else { executionLog.Log("MergeContact", "Wait for Confirmatoion"); office_ContactsHelper.WaitForText("A Contact has been created.", 10); executionLog.Log("MergeContact", "Visist Contact"); VisitOffice("contacts"); executionLog.Log("MergeContact", "Select 1st Contact"); office_ContactsHelper.ClickElement("SelectIstContact"); executionLog.Log("MergeContact", "Select 2nd Contact"); office_ContactsHelper.ClickElement("Select2ndContact"); executionLog.Log("MergeContact", "Merge Record Contact"); office_ContactsHelper.ClickElement("MergeRecordContact"); executionLog.Log("MergeContact", "Select Comp Contact"); office_ContactsHelper.ClickElement("SelectCompContact"); executionLog.Log("MergeContact", "Click on Merge Button"); office_ContactsHelper.ClickElement("ClickOnMergeBtn"); office_ContactsHelper.AcceptAlert(); executionLog.Log("MergeContact", "Wait for Confirmation"); office_ContactsHelper.WaitForText("Merging Contact(s) Completed Successfully.", 10); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("MergeContact"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("MergeContact"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("MergeContact", "Bug", "Medium", "Contacts page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("MergeContact"); TakeScreenshot("MergeContact"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Merge.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("MergeContact"); string id = loginHelper.getIssueID("MergeContact"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\Merge.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("MergeContact"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("MergeContact"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("MergeContact"); executionLog.WriteInExcel("MergeContact", Status, JIRA, "Office Contact"); } }
public void clientEmailUrlChange() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_office"); password = oXMLData.getData("settings/Credentials", "password"); // Initializing the objects var executionLog = new ExecutionLog(); var loginHelper = new LoginHelper(GetWebDriver()); var office_ClientsHelper = new Office_ClientsHelper(GetWebDriver()); var officeActivities_EmailHelper = new OfficeActivities_EmailsHelper(GetWebDriver()); // Variable var SendTo = "Test" + GetRandomNumber() + "@yopmail.com"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ClientEmailUrlChange", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ClientEmailUrlChange", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("ClientEmailUrlChange", "Goto User Agent >> Client"); VisitOffice("clients"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientEmailUrlChange", "Click On Any Client"); office_ClientsHelper.ClickElement("ClickOnAnyClient"); office_ClientsHelper.WaitForWorkAround(3000); executionLog.Log("ClientEmailUrlChange", "Click On Send Email button"); office_ClientsHelper.ClickElement("AddEmail"); officeActivities_EmailHelper.WaitForWorkAround(2000); executionLog.Log("ClientEmailUrlChange", "Enter Email Id"); officeActivities_EmailHelper.TypeText("To", SendTo); var EmailName = "Email Subj Test" + GetRandomNumber(); executionLog.Log("ClientEmailUrlChange", "Enter Subject"); officeActivities_EmailHelper.TypeText("EmailName", EmailName); //officeActivities_EmailHelper.WaitForWorkAround(4000); executionLog.Log("ClientEmailUrlChange", "Click on Send button"); officeActivities_EmailHelper.ClickElement("SendEmailActivity"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("ClientEmailUrlChange", "Select Activity >> Email"); officeActivities_EmailHelper.Select("SelectActivityType", "E-Mails"); executionLog.Log("ClientEmailUrlChange", "Click on Email in Activity"); officeActivities_EmailHelper.ClickJS("ClickEmail1"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("ClientEmailUrlChange", "Change the url with the url number of another office"); VisitOffice("mails/view/ "); //officeActivities_EmailHelper.WaitForWorkAround(4000); executionLog.Log("ClientEmailUrlChange", "Verify Validation"); officeActivities_EmailHelper.WaitForText("You don't have privileges to view this E-Mail.", 05); executionLog.Log("SendEmailFromActivity", "Redirect to URL"); VisitOffice("mails/sent"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("SendEmailFromActivity", "Verify page title"); VerifyTitle("Sent"); executionLog.Log("SendEmailFromActivity", "Enter Send to in search "); officeActivities_EmailHelper.TypeText("SearchMailInput", SendTo); executionLog.Log("SendEmailFromActivity", "Click on search btn"); officeActivities_EmailHelper.ClickElement("SearchBtn"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("SendEmailFromActivity", "Select searched email."); officeActivities_EmailHelper.ClickJS("CheckBox1"); executionLog.Log("SendEmailFromActivity", "Click on delete btn"); officeActivities_EmailHelper.ClickElement("Delete"); officeActivities_EmailHelper.WaitForWorkAround(3000); executionLog.Log("SendEmailFromActivity", "Verify Email Deleted successfully"); officeActivities_EmailHelper.WaitForText("E-Mail has been moved to the Recycle Bin.", 05); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("ClientEmailUrlChange"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Client Email Url Change"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Client Email Url Change", "Bug", "Medium", "Client page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Client Email Url Change"); TakeScreenshot("ClientEmailUrlChange"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientEmailUrlChange.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ClientEmailUrlChange"); string id = loginHelper.getIssueID("Client Email Url Change"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ClientEmailUrlChange.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Client Email Url Change"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Client Email Url Change"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ClientEmailUrlChange"); executionLog.WriteInExcel("Client Email Url Change", Status, JIRA, "Client management"); } }