public void pDFImportWizard() { 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 var name = "Test" + RandomNumber(1, 99); var filename = GetPathToFile() + "2.pdf"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("PDFImportWizard1", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("PDFImportWizard1", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("PDFImportWizard1", "Redirected at admin portal."); VisitOffice("admin"); executionLog.Log("PDFImportWizard1", "Redirect at pdf import page."); VisitOffice("pdf_templates/import"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("PDFImportWizard1", "Verify Page title"); VerifyTitle("PDF Import Wizard"); executionLog.Log("PDFImportWizard1", "Click on Import button"); pDFTemplate_ImportWizardHelper.ClickElement("Import"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("PDFImportWizard1", "Verify validation"); pDFTemplate_ImportWizardHelper.VerifyPageText("This field is required."); pDFTemplate_ImportWizardHelper.WaitForWorkAround(1000); executionLog.Log("PDFImportWizard1", "Choose Module"); pDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(1000); executionLog.Log("PDFImportWizard1", "Upload PDF File"); pDFTemplate_ImportWizardHelper.upload("SelectFile", filename); pDFTemplate_ImportWizardHelper.WaitForWorkAround(1000); executionLog.Log("PDFImportWizard1", "Click On Import"); pDFTemplate_ImportWizardHelper.ClickElement("Import"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("PDFImportWizard1", "Click On Next"); pDFTemplate_ImportWizardHelper.ClickElement("Next"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("PDFImportWizard1", "Select Category"); pDFTemplate_ImportWizardHelper.SelectByText("Category", "Other"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(1000); executionLog.Log("PDFImportWizard1", "Click on Save button"); pDFTemplate_ImportWizardHelper.ClickElement("Save"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("PDFImportWizard1", "Search the same file"); pDFTemplate_ImportWizardHelper.TypeText("SearchPDF", "2.pdf"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("PDFImportWizard1", "Click Delete btn "); pDFTemplate_ImportWizardHelper.ClickElement("CheckBox1"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("PDFImportWizard1", "Click Delete btn "); pDFTemplate_ImportWizardHelper.ClickElement("DeletePDF"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("PDFImportWizard1", "Accept alert message. "); pDFTemplate_ImportWizardHelper.AcceptAlert(); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("PDFImportWizard1", "Wait for message "); pDFTemplate_ImportWizardHelper.WaitForText("PDF Template Deleted Successfully.", 10); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("PDFImportWizard1"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("PDF Import Wizard 1"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("PDF Import Wizard 1", "Bug", "Medium", "Import Wizard page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("PDF Import Wizard 1"); TakeScreenshot("PDFImportWizard1"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PDFImportWizard1.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("PDFImportWizard1"); string id = loginHelper.getIssueID("PDF Import Wizard 1"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PDFImportWizard1.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("PDF Import Wizard 1"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("PDF Import Wizard 1"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("PDFImportWizard1"); executionLog.WriteInExcel("PDF Import Wizard 1", Status, JIRA, "PDF Import"); } }
public void importAndMapPDFAzura() { 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 var name = "Test" + GetRandomNumber(); String filename = GetPathToFile() + "AZURA Bill of Sale.pdf"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("ImportAndMapPDFAzura", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("ImportAndMapPDFAzura", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("ImportAndMapPDFAzura", "Click On Admin"); VisitOffice("admin"); executionLog.Log("ImportAndMapPDFAzura", "Redirect"); VisitOffice("pdf_templates/import"); executionLog.Log("ImportAndMapPDFAzura", "Verify title"); VerifyTitle("PDF Import Wizard"); executionLog.Log("ImportAndMapPDFAzura", "Choose Module"); pDFTemplate_ImportWizardHelper.Select("SelectModule", "20"); executionLog.Log("ImportAndMapPDFAzura", "Upload PDF File"); pDFTemplate_ImportWizardHelper.upload("SelectFile", filename); pDFTemplate_ImportWizardHelper.WaitForWorkAround(1000); executionLog.Log("ImportAndMapPDFAzura", "Click On Import"); pDFTemplate_ImportWizardHelper.ClickElement("Import"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("ImportAndMapPDFAzura", "Click on next button."); pDFTemplate_ImportWizardHelper.ClickForce("Next"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("ImportAndMapPDFAzura", "verify title"); VerifyTitle("PDF Import Wizard"); executionLog.Log("ImportAndMapPDFAzura", "Select pdf category as other"); pDFTemplate_ImportWizardHelper.SelectByText("Category", "Other"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click on display intabs checkbox"); pDFTemplate_ImportWizardHelper.ClickElement("DisplayinTabs"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click on can share checkbox"); pDFTemplate_ImportWizardHelper.ClickElement("CanShare"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click on can email checkbox"); pDFTemplate_ImportWizardHelper.ClickElement("CanEmail"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click on all teams radio button"); pDFTemplate_ImportWizardHelper.ClickElement("AllTeams"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click on Save button"); pDFTemplate_ImportWizardHelper.ClickElement("Save1"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("ImportAndMapPDFAzura", "wait for text success text."); pDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10); executionLog.Log("ImportAndMapPDFAzura", "Redirect at pdf templates page."); VisitOffice("pdf_templates"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("ImportAndMapPDFAzura", "Search uploaded pdf by name"); pDFTemplate_ImportWizardHelper.TypeText("SearchName", "AZURA Bill of Sale"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click on edit mapping icon."); pDFTemplate_ImportWizardHelper.ClickElement("EditPDFMapping"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Verify page title."); VerifyTitle("PDF Import Wizard"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click on map default dictionary fields."); pDFTemplate_ImportWizardHelper.ClickElement("DefaultDictionary"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); //executionLog.Log("ImportAndMapPDFAzura", "Wait for locator to be present."); //pDFTemplate_ImportWizardHelper.WaitForElementPresent("SearchPDFField", 10); executionLog.Log("ImportAndMapPDFAzura", "Search imported pdf file field by name"); pDFTemplate_ImportWizardHelper.TypeText("SearchPDFField", "Title"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); //executionLog.Log("ImportAndMapPDFAzura", "Wait for locator to be present."); //pDFTemplate_ImportWizardHelper.WaitForElementPresent("MapWithRule", 10); executionLog.Log("ImportAndMapPDFAzura", "Select mapping method as rule set."); pDFTemplate_ImportWizardHelper.ClickElement("MapWithRule"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); //executionLog.Log("ImportAndMapPDFAzura", "Wait for locator to be present."); //pDFTemplate_ImportWizardHelper.WaitForElementPresent("SelectRuleType", 10); executionLog.Log("ImportAndMapPDFAzura", "Select rule set type to Owner/contact."); pDFTemplate_ImportWizardHelper.SelectByText("SelectRuleType", "Contact/Owner/Banking Details"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); //executionLog.Log("ImportAndMapPDFAzura", "Wait for locator to be present.."); //pDFTemplate_ImportWizardHelper.WaitForElementPresent("SelectContactOwner", 10); executionLog.Log("ImportAndMapPDFAzura", "Select type as owner"); pDFTemplate_ImportWizardHelper.SelectByText("SelectContactOwner", "Owner"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select owner type as primary."); pDFTemplate_ImportWizardHelper.SelectByText("PrimaryOther", "Primary"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select owner field as title."); pDFTemplate_ImportWizardHelper.SelectByText("SelectContactOwnerFiled", "Title"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Save mapping / rule."); pDFTemplate_ImportWizardHelper.ClickElement("SaveRule"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("ImportAndMapPDFAzura", "Search pdf field as vendor name."); pDFTemplate_ImportWizardHelper.TypeText("SearchPDFField", "Vender Name"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("ImportAndMapPDFAzura", "Select rule type as owner/contact"); pDFTemplate_ImportWizardHelper.SelectByText("SelectRuleType", "Contact/Owner/Banking Details"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select rule type as owner."); pDFTemplate_ImportWizardHelper.SelectByText("SelectContactOwner", "Owner"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select type of owner as primary."); pDFTemplate_ImportWizardHelper.SelectByText("PrimaryOther", "Primary"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select owner first name."); pDFTemplate_ImportWizardHelper.SelectByText("SelectContactOwnerFiled", "First Name of Guarantor"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click on add field."); pDFTemplate_ImportWizardHelper.ClickElement("AddField"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select delimiter type as space."); pDFTemplate_ImportWizardHelper.SelectByText("SelectDelimiter1", "Concat with Space( )"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("ImportAndMapPDFAzura", "Select vendor middle name."); pDFTemplate_ImportWizardHelper.SelectByText("VendorMiddleName", "Middle Name of Guarantor"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("ImportAndMapPDFAzura", "Click on add fields"); pDFTemplate_ImportWizardHelper.ClickElement("AddField"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(1000); executionLog.Log("ImportAndMapPDFAzura", "Select delimiter type as space."); pDFTemplate_ImportWizardHelper.SelectByText("SelectDelimiter2", "Concat with Space( )"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("ImportAndMapPDFAzura", "select last name of vendor."); pDFTemplate_ImportWizardHelper.SelectByText("VendorLastName", "Last Name of Guarantor"); //pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("ImportAndMapPDFAzura", "Save rule / mapping."); pDFTemplate_ImportWizardHelper.ClickElement("SaveRule"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("ImportAndMapPDFAzura", "Search pdf field address"); pDFTemplate_ImportWizardHelper.TypeText("SearchPDFField", "Address"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select address line1."); pDFTemplate_ImportWizardHelper.SelectByText("SelectContactOwnerFiled", "Address Line 1"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select address line 2."); pDFTemplate_ImportWizardHelper.SelectByText("VendorMiddleName", "Address Line 2"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Remove third added field."); pDFTemplate_ImportWizardHelper.ClickElement("Remove2"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Save rule / mapping."); pDFTemplate_ImportWizardHelper.ClickElement("SaveRule"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Search pdf file field city."); pDFTemplate_ImportWizardHelper.TypeText("SearchPDFField", "City"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "select address field city."); pDFTemplate_ImportWizardHelper.SelectByText("SelectContactOwnerFiled", "City"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Remove added field from previous rule."); pDFTemplate_ImportWizardHelper.ClickElement("Remove1"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click to save rule /mapping."); pDFTemplate_ImportWizardHelper.ClickElement("SaveRule"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Search pdf field state."); pDFTemplate_ImportWizardHelper.TypeText("SearchPDFField", "State"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select address field state."); pDFTemplate_ImportWizardHelper.SelectByText("SelectContactOwnerFiled", "State"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Save rule / mapping."); pDFTemplate_ImportWizardHelper.ClickElement("SaveRule"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Search pdf field zip code."); pDFTemplate_ImportWizardHelper.TypeText("SearchPDFField", "Zip"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select adress field zip code."); pDFTemplate_ImportWizardHelper.SelectByText("SelectContactOwnerFiled", "Zip Code"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click to save rule / mapping."); pDFTemplate_ImportWizardHelper.ClickElement("SaveRule"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Search pdf field vendor phone number."); pDFTemplate_ImportWizardHelper.TypeText("SearchPDFField", "Vender Phone Number"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select rule type as office details."); pDFTemplate_ImportWizardHelper.SelectByText("SelectRuleType", "Office Details"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Select office details field phone number"); pDFTemplate_ImportWizardHelper.SelectByText("OfficeDetailFields", "Phone Number"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("ImportAndMapPDFAzura", "Click to save rule / mapping."); pDFTemplate_ImportWizardHelper.ClickElement("SaveRule"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("ImportAndMapPDFAzura", "Click on save button to finish mapping."); pDFTemplate_ImportWizardHelper.ClickElement("SaveEdit"); executionLog.Log("ImportAndMapPDFAzura", "Click on check box to select pdf file."); pDFTemplate_ImportWizardHelper.ClickElement("CheckBox1"); executionLog.Log("ImportAndMapPDFAzura", "Click Delete btn "); pDFTemplate_ImportWizardHelper.ClickElement("DeletePDF"); executionLog.Log("ImportAndMapPDFAzura", "Accept alert message. "); pDFTemplate_ImportWizardHelper.AcceptAlert(); executionLog.Log("ImportAndMapPDFAzura", "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("ImportAndMapPDFAzura"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("PDF Import Wizard"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("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("PDF Import Wizard"); TakeScreenshot("ImportAndMapPDFAzura"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ImportAndMapPDFAzura.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("ImportAndMapPDFAzura"); string id = loginHelper.getIssueID("PDF Import Wizard"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\ImportAndMapPDFAzura.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("PDF Import Wizard"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("PDF Import Wizard"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("ImportAndMapPDFAzura"); executionLog.WriteInExcel("PDF Import Wizard", Status, JIRA, "PDF Import"); } }
public void missingPhoneSectionIssue() { 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_ImportWizardHelper = new PDFTemplate_ImportWizardHelper(GetWebDriver()); String Status = "Pass"; String JIRA = ""; try { executionLog.Log("MissingPhoneSectionIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("MissingPhoneSectionIssue", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("MissingPhoneSectionIssue", "Redirect To Admin"); VisitOffice("admin"); executionLog.Log("MissingPhoneSectionIssue", "Redirect To Import"); VisitOffice("pdf_templates/import"); executionLog.Log("MissingPhoneSectionIssue", "ChooseModule"); pDFTemplate_ImportWizardHelper.Select("SelectModule", "20"); executionLog.Log("MissingPhoneSectionIssue", "Upload file"); var path = GetPathToFile() + "2.pdf"; pDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", path); executionLog.Log("MissingPhoneSectionIssue", "Import file and Click import"); pDFTemplate_ImportWizardHelper.ClickElement("Import"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("MissingPhoneSectionIssue", "Select tab"); pDFTemplate_ImportWizardHelper.SelectByText("Tab", "Contacts"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("MissingPhoneSectionIssue", "Select Section"); pDFTemplate_ImportWizardHelper.SelectByText("Section", "Contacts"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(4000); executionLog.Log("MissingPhoneSectionIssue", "Selects SubSection"); pDFTemplate_ImportWizardHelper.SelectByText("SubSection", "Phones"); executionLog.Log("MissingPhoneSectionIssue", "Verify Phones is available"); Assert.IsTrue(pDFTemplate_ImportWizardHelper.IsElementPresent("//*[@id='sub_section']/option[text()='Phones']")); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("MissingPhoneSectionIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Missing Phone Section Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Missing Phone Section Issue", "Bug", "Medium", "PDF Templates page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Missing Phone Section Issue"); TakeScreenshot("MissingPhoneSectionIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MissingPhoneSectionIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("MissingPhoneSectionIssue"); string id = loginHelper.getIssueID("Missing Phone Section Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\MissingPhoneSectionIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Missing Phone Section Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Missing Phone Section Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("MissingPhoneSectionIssue"); executionLog.WriteInExcel("Missing Phone Section Issue", Status, JIRA, "PDF Templates"); } }
public void restoreDeletedPDFTemplate() { 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 pDFTemplate_ImportWizardHelper = new PDFTemplate_ImportWizardHelper(GetWebDriver()); // Variable random var name = "TESTCLIENT" + RandomNumber(1, 999); try { executionLog.Log("RestoreDeletedPDFTemplate", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("RestoreDeletedPDFTemplate", "Verify Page title"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("RestoreDeletedPDFTemplate", "Redirect To Import"); VisitOffice("pdf_templates/import"); executionLog.Log("RestoreDeletedPDFTemplate", "Select Module"); pDFTemplate_ImportWizardHelper.Select("SelectModule", "20"); var path = GetPathToFile() + "2.pdf"; executionLog.Log("RestoreDeletedPDFTemplate", "Upload file"); pDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", path); executionLog.Log("RestoreDeletedPDFTemplate", "Click import"); pDFTemplate_ImportWizardHelper.ClickElement("Import"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("RestoreDeletedPDFTemplate", "Wait for text to hide."); pDFTemplate_ImportWizardHelper.WaitForTextHide("Your request is being processed.", 10); executionLog.Log("RestoreDeletedPDFTemplate", "ClickOnNext"); pDFTemplate_ImportWizardHelper.ClickElement("Next"); executionLog.Log("RestoreDeletedPDFTemplate", "Select Category"); pDFTemplate_ImportWizardHelper.SelectByText("Category", "Other"); executionLog.Log("RestoreDeletedPDFTemplate", "Click On Save"); pDFTemplate_ImportWizardHelper.ClickElement("Save"); executionLog.Log("RestoreDeletedPDFTemplate", "Verify messaeg"); pDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10); executionLog.Log("RestoreDeletedPDFTemplate", "Enter PDF to search."); pDFTemplate_ImportWizardHelper.TypeText("SearchPDF", "2.pdf"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("RestoreDeletedPDFTemplate", "SelectModuleToSearch"); pDFTemplate_ImportWizardHelper.Select("SearchModule", "merchants"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("RestoreDeletedPDFTemplate", "Click on pdf"); pDFTemplate_ImportWizardHelper.ClickElement("PDF1"); executionLog.Log("RestoreDeletedPDFTemplate", "cLICK On Delete"); pDFTemplate_ImportWizardHelper.ClickElement("ClickOnDelete"); executionLog.Log("RestoreDeletedPDFTemplate", "Accept alert message."); pDFTemplate_ImportWizardHelper.AcceptAlert(); executionLog.Log("RestoreDeletedPDFTemplate", "Wait for delete message.."); pDFTemplate_ImportWizardHelper.WaitForText("PDF Template Deleted Successfully.", 10); executionLog.Log("RestoreDeletedPDFTemplate", "Redirect template"); VisitOffice("pdf_templates"); executionLog.Log("RestoreDeletedPDFTemplate", "Click on recycle bin link"); pDFTemplate_ImportWizardHelper.ClickElement("ClickOnReCycleBin"); executionLog.Log("RestoreDeletedPDFTemplate", "Click On Restore Template icon"); pDFTemplate_ImportWizardHelper.ClickElement("ClickOnRestoreTemplate"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("RestoreDeletedPDFTemplate", "PDF Template Restored Successfully."); pDFTemplate_ImportWizardHelper.WaitForText("PDF Template Restored Successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("RestoreDeletedPDFTemplate"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Restore Deleted PDF Template"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Restore Deleted PDF Template", "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("Restore Deleted PDF Template"); TakeScreenshot("RestoreDeletedPDFTemplate"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\RestoreDeletedPDFTemplate.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("RestoreDeletedPDFTemplate"); string id = loginHelper.getIssueID("Restore Deleted PDF Template"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\RestoreDeletedPDFTemplate.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Restore Deleted PDF Template"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Restore Deleted PDF Template"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("RestoreDeletedPDFTemplate"); executionLog.WriteInExcel("Restore Deleted PDF Template", Status, JIRA, "PDF Template"); } }
public void typoOfficeDetailsIssue() { 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 var name = "Test" + GetRandomNumber(); String filename = GetPathToFile() + "AZURA Bill of Sale.pdf"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("TypoOfficeDetailsIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("TypoOfficeDetailsIssue", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("TypoOfficeDetailsIssue", "Click On Admin"); VisitOffice("admin"); executionLog.Log("TypoOfficeDetailsIssue", "Redirect at pdf templates page."); VisitOffice("pdf_templates"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(3000); executionLog.Log("TypoOfficeDetailsIssue", "Search uploaded pdf by name"); pDFTemplate_ImportWizardHelper.TypeText("SearchName", "AZURA Bill of Sale"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("TypoOfficeDetailsIssue", "Click on edit mapping icon."); pDFTemplate_ImportWizardHelper.ClickElement("EditPDFMapping"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("TypoOfficeDetailsIssue", "Wait for locator to be present."); pDFTemplate_ImportWizardHelper.WaitForElementPresent("MapWithRule", 10); executionLog.Log("TypoOfficeDetailsIssue", "Select mapping method as rule set."); pDFTemplate_ImportWizardHelper.ClickElement("MapWithRule"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("TypoOfficeDetailsIssue", "Search pdf field vendor phone number."); pDFTemplate_ImportWizardHelper.TypeText("SearchPDFField", "Vender Phone Number"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); executionLog.Log("TypoOfficeDetailsIssue", "Select rule type as office details."); pDFTemplate_ImportWizardHelper.SelectByText("SelectRuleType", "Office Details"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(2000); executionLog.Log("TypoOfficeDetailsIssue", "Text to be verified under the rule."); pDFTemplate_ImportWizardHelper.TypoError("Toll Free Phone Number"); pDFTemplate_ImportWizardHelper.WaitForWorkAround(5000); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("TypoOfficeDetailsIssue"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Typo Office Details Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Typo Office Details Issue", "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("Typo Office Details Issue"); TakeScreenshot("TypoOfficeDetailsIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TypoOfficeDetailsIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("TypoOfficeDetailsIssue"); string id = loginHelper.getIssueID("Typo Office Details Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\TypoOfficeDetailsIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Typo Office Details Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Typo Office Details Issue"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("TypoOfficeDetailsIssue"); executionLog.WriteInExcel("Typo Office Details Issue", Status, JIRA, "PDF Import"); } }
public void pDFImpotWizard() { string[] username = null; string[] username1 = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username_corp"); username1 = 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()); var pDFTemplate_PDFTemplateHelper = new PDFTemplate_PDFTemplateHelper(GetWebDriver()); var corpPDFTemplate_ImportWizardHelper = new CorpPDFTemplate_ImportWizardHelper(GetWebDriver()); var corpPDFTemplate_CategoriesHelper = new CorpPDFTemplate_CategoriesHelper(GetWebDriver()); // Variable random var Category = "Category" + RandomNumber(1, 99999); var name = "TestMerchant" + GetRandomNumber(); var FilePth = GetPathToFile() + "real.pdf"; var InvalidFilePath = GetPathToFile() + "clientsamples(2).csv"; String JIRA = ""; String Status = "Pass"; try { executionLog.Log("PDFImpotWizard", "Login with valid username and password"); Login(username[0], password[0]); executionLog.Log("PDFImpotWizard", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("PDFImpotWizard", "Redirect at pdf categories pge."); VisitCorp("pdf_templates/categories"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Click Create PDF Template"); corpPDFTemplate_CategoriesHelper.ClickElement("Create"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Enter PDF NAME"); corpPDFTemplate_CategoriesHelper.TypeText("EnterName", Category); executionLog.Log("PDFImpotWizard", "Click on Save"); corpPDFTemplate_CategoriesHelper.ClickElement("Save"); executionLog.Log("PDFImpotWizard", "Wait for Confirmation"); corpPDFTemplate_CategoriesHelper.WaitForText("Category Created Successfully", 10); executionLog.Log("PDFImpotWizard", "Visit pdf Template import page"); VisitCorp("pdf_templates/import"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Select Module."); corpPDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients"); executionLog.Log("PDFImpotWizard", "Uplaod File"); corpPDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", FilePth); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000); executionLog.Log("PDFImpotWizard", "Click on Import"); corpPDFTemplate_ImportWizardHelper.ClickElement("Import"); executionLog.Log("PDFImpotWizard", "Wait for next button to appear."); corpPDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextbtn", 10); executionLog.Log("PDFImpotWizard", "Click on Next"); corpPDFTemplate_ImportWizardHelper.ClickDisplayed("//button[@title='Next']"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Wait for Confirmation"); corpPDFTemplate_ImportWizardHelper.WaitForText("PDF fields mapped successfully.", 05); executionLog.Log("PDFImpotWizard", "Wait for next button to appear."); corpPDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextBtn2", 10); executionLog.Log("PDFImpotWizard", "Click on Next button again"); corpPDFTemplate_ImportWizardHelper.ClickElement("ClickNextBtn2"); executionLog.Log("PDFImpotWizard", "Verify confirmation"); corpPDFTemplate_ImportWizardHelper.WaitForText("Signature Options saved successfully.", 10); executionLog.Log("PDFImpotWizard", "Select Category"); corpPDFTemplate_ImportWizardHelper.SelectByText("SelectCatory", "Card Service Agreements"); executionLog.Log("PDFImpotWizard", "Click on Save"); corpPDFTemplate_ImportWizardHelper.ClickElement("Save"); executionLog.Log("PDFImpotWizard", "Verif Confirmation"); corpPDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10); executionLog.Log("PDFImpotWizard", "Visit pdf Template import page"); VisitCorp("pdf_templates/import"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Click Import"); corpPDFTemplate_ImportWizardHelper.ClickElement("Import"); //corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Wait for validation text."); corpPDFTemplate_ImportWizardHelper.WaitForText("This field is required.", 10); executionLog.Log("PDFImpotWizard", "Click on cancel."); corpPDFTemplate_ImportWizardHelper.ClickDisplayed("//a[@title='Cancel']"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Verify text on page."); corpPDFTemplate_ImportWizardHelper.VerifyText("VerifyTextPDFTemplatesHeader", "PDF Templates"); executionLog.Log("PDFImpotWizard", "Visit pdf Template import page"); VisitCorp("pdf_templates/import"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Select Module"); corpPDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients"); executionLog.Log("PDFImpotWizard", "Uplaod File"); corpPDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", InvalidFilePath); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000); executionLog.Log("PDFImpotWizard", "Click Import"); corpPDFTemplate_ImportWizardHelper.ClickElement("Import"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Accept alert message."); corpPDFTemplate_ImportWizardHelper.AcceptAlert(); executionLog.Log("PDFImpotWizard", "Logout from the application."); VisitCorp("logout"); executionLog.Log("PDFImpotWizard", "Login to the office module."); Login(username1[0], password[0]); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(2000); executionLog.Log("PDFImpotWizard", "Goto PDF Categories"); VisitOffice("pdf_templates/categories"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(4000); executionLog.Log("PDFImpotWizard", "Click Create PDF Template"); pDFTemplate_PDFTemplateHelper.ClickElement("ClickCreatePDFImp"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000); executionLog.Log("PDFImpotWizard", "Enter PDF Category Name"); pDFTemplate_PDFTemplateHelper.TypeText("EnterPDFCategoryName", Category); executionLog.Log("PDFImpotWizard", "Click on Save"); pDFTemplate_PDFTemplateHelper.ClickElement("PDFImportSave"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Goto pdf template import"); VisitOffice("pdf_templates/import"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Select Module"); pDFTemplate_ImportWizardHelper.SelectByText("SelectModule", "Clients"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000); executionLog.Log("PDFImpotWizard", "Upload file."); pDFTemplate_ImportWizardHelper.UploadFile("//*[@id='PdfTemplatePdfFile']", FilePth); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000); executionLog.Log("PDFImpotWizard", "Click Import PDF"); pDFTemplate_ImportWizardHelper.ClickElement("Import"); executionLog.Log("PDFImpotWizard", "Wait for next button to appear."); pDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextbtn", 10); executionLog.Log("PDFImpotWizard", "Click Next button"); pDFTemplate_ImportWizardHelper.ClickElement("Next"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Verify Confirmation"); pDFTemplate_ImportWizardHelper.WaitForText("PDF fields mapped successfully.", 10); executionLog.Log("PDFImpotWizard", "Wait for next button to appear."); pDFTemplate_ImportWizardHelper.WaitForElementPresent("ClickNextBtn2", 10); executionLog.Log("PDFImpotWizard", "Click Next button"); pDFTemplate_ImportWizardHelper.ClickElement("ClickNextBtn2"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(3000); executionLog.Log("PDFImpotWizard", "Select Category."); pDFTemplate_ImportWizardHelper.SelectByText("Category", "Card Service Agreements"); corpPDFTemplate_CategoriesHelper.WaitForWorkAround(1000); executionLog.Log("PDFImpotWizard", "Click on Save"); pDFTemplate_ImportWizardHelper.ClickElement("Save"); executionLog.Log("PDFImpotWizard", "Wait for Confirmation"); pDFTemplate_ImportWizardHelper.WaitForText("PDF Template options saved successfully.", 10); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("PDFImpotWizard"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("PDF Impot Wizard"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("PDF Impot Wizard", "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 Impot Wizard"); TakeScreenshot("PDFImpotWizard"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PDFImpotWizard.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("PDFImpotWizard"); string id = loginHelper.getIssueID("PDF Impot Wizard"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\PDFImpotWizard.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("PDF Impot Wizard"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("PDF Impot Wizard"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("PDFImpotWizard"); executionLog.WriteInExcel("PDF Impot Wizard", Status, JIRA, "PDF Import"); } }