public void verifyPartnerAssociationAdvanceFilterColumnOrder() { 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 agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver()); // Variable Random String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Page title as dash board"); VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Redirect To partner association page."); VisitOffice("partners/associations"); agents_PartnerAssociationHelper.WaitForWorkAround(5000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify page title as partner association"); VerifyTitle("Partner Associations"); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify status column is visible on the page."); agents_PartnerAssociationHelper.IsElementPresent("HeadStatus"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify E-Mail column is visible on the page."); agents_PartnerAssociationHelper.IsElementPresent("HeadEmail"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Phone column is visible on the page."); agents_PartnerAssociationHelper.IsElementPresent("HeadPhone"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Modified column is visible on the page."); agents_PartnerAssociationHelper.IsElementPresent("HeadModified"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click on advance filter button."); agents_PartnerAssociationHelper.ClickElement("AdvanceFilter"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select status in displayed columns."); agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "Status"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click arrow to move column to avail cols."); agents_PartnerAssociationHelper.ClickElement("RemoveCols"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select E-Mail in displayed columns."); agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "E-Mail"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click arrow to move column to avail cols"); agents_PartnerAssociationHelper.ClickElement("RemoveCols"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select Phone in displayed columns."); agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "Phone"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click arrow to move column to avail cols"); agents_PartnerAssociationHelper.ClickElement("RemoveCols"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select Modified in displayed columns."); agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "Modified"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click arrow to move column to avail cols"); agents_PartnerAssociationHelper.ClickElement("RemoveCols"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click on Apply button."); agents_PartnerAssociationHelper.ClickElement("ApplyButton"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify status column not present on page."); agents_PartnerAssociationHelper.IsElementNotPresent("HeadStatus"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify E-Mail column not present on page."); agents_PartnerAssociationHelper.IsElementNotPresent("HeadEmail"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Phone column not present on page."); agents_PartnerAssociationHelper.IsElementNotPresent("HeadPhone"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify Modified column not present on page."); agents_PartnerAssociationHelper.IsElementNotPresent("HeadModified"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Redirect at leads page."); VisitOffice("leads"); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify page title as leads."); VerifyTitle("Leads"); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Redirect at partner associations page."); VisitOffice("partners/associations"); agents_PartnerAssociationHelper.WaitForWorkAround(5000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify page title as partner association."); VerifyTitle("Partner Associations"); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify default position of E-Mail column."); agents_PartnerAssociationHelper.IsElementPresent("HeadEmail5"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify default position of Phone column."); agents_PartnerAssociationHelper.IsElementPresent("HeadPhone6"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Redirect at partner associations page."); VisitOffice("partners/associations"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click on advance filter button."); agents_PartnerAssociationHelper.ClickElement("AdvanceFilter"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select E-Mail in displayed column."); agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "E-Mail"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Move email 1 step up."); agents_PartnerAssociationHelper.ClickElement("MoveUp"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Move email 1 step up."); agents_PartnerAssociationHelper.ClickElement("MoveUp"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Move email 1 step up."); agents_PartnerAssociationHelper.ClickElement("MoveUp"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Select Phone in displayed column."); agents_PartnerAssociationHelper.SelectByText("DisplayedCols", "Phone"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Move phone 1 step down."); agents_PartnerAssociationHelper.ClickElement("MoveDown"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Click on Apply button."); agents_PartnerAssociationHelper.ClickElement("ApplyButton"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify changed position of E-Mail column."); agents_PartnerAssociationHelper.IsElementPresent("HeadEmail3"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "Verify changed position of Phone column."); agents_PartnerAssociationHelper.IsElementPresent("HeadPhone7"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyPartnerAssociationAdvanceFilterColumnOrder", "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("VerifyPartnerAssociationAdvanceFilterColumnOrder"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Partner Association Advance Filter Column Order"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Partner Association Advance Filter Column Order", "Bug", "Medium", "Activities page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Partner Association Advance Filter Column Order"); TakeScreenshot("VerifyPartnerAssociationAdvanceFilterColumnOrder"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyPartnerAssociationAdvanceFilterColumnOrder.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyPartnerAssociationAdvanceFilterColumnOrder"); string id = loginHelper.getIssueID("Verify Partner Association Advance Filter Column Order"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyPartnerAssociationAdvanceFilterColumnOrder.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Partner Association Advance Filter Column Order"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Partner Association Advance Filter Column Order"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyPartnerAssociationAdvanceFilterColumnOrder"); executionLog.WriteInExcel("Verify Partner Association Advance Filter Column Order", Status, JIRA, "Meetings Management"); } }
public void verifyEditPartnerAssociationConnectUsername() { 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 agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver()); // Variable var assname = "TestAssociate" + GetRandomNumber(); var name = "TestAgent" + RandomNumber(111, 999999); var user = "******" + RandomNumber(111, 9999999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Go to Partner Agent page."); VisitOffice("partners/association/create"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify page title."); VerifyTitle("Create a Partner Association"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter Association name"); agents_PartnerAssociationHelper.TypeText("Name", assname); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter FirstNAME"); agents_PartnerAssociationHelper.TypeText("FirstNAME", name); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter LastName"); agents_PartnerAssociationHelper.TypeText("LastName", "Tester"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter Date Of Birth"); agents_PartnerAssociationHelper.TypeText("Birthday", "08/08/1992"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select eAddressType"); agents_PartnerAssociationHelper.Select("eAddressType", "E-Mail"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select eAddressLebel"); agents_PartnerAssociationHelper.Select("eAddressLebel", "Work"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter eAddressType"); var Email = "P.Ass" + GetRandomNumber() + "@yopmail.com"; agents_PartnerAssociationHelper.TypeText("eAddress", Email); //executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select User Account Check Box"); //agents_PartnerAssociationHelper.ClickElement("UserAccChkBox"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter Username"); agents_PartnerAssociationHelper.TypeText("UserName", user); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Select PartnerUser Avatar Check Box"); agents_PartnerAssociationHelper.ClickElement("ClickOnAvatar"); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Click Save Agent btn"); agents_PartnerAssociationHelper.ClickElement("AssSave"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify success message. "); agents_PartnerAssociationHelper.WaitForText("Partner Association Created Successfully.", 05); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Go to All Partner Association"); VisitOffice("partners/associations"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Enter association name to be searched"); agents_PartnerAssociationHelper.TypeText("SearchAssociation", assname); agents_PartnerAssociationHelper.WaitForWorkAround(2000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Edit association"); agents_PartnerAssociationHelper.ClickElement("EditAssociation1"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("VerifyEditPartnerAssociationConnectUsername", "Verify username box is not present anymore"); Assert.IsFalse(agents_PartnerAssociationHelper.IsElementPresent("//*[@id='UserUserName']")); } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("VerifyEditPartnerAssociationConnectUsername"); String Error = executionLog.GetAllTextFile("Error"); Console.WriteLine(Error); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Verify Edit Partner Association Connect Username"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Verify Edit Partner Association Connect Username", "Bug", "Medium", "Partner Agents", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Verify Edit Partner Association Connect Username"); TakeScreenshot("VerifyEditPartnerAssociationConnectUsername"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyEditPartnerAssociationConnectUsername.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("VerifyEditPartnerAssociationConnectUsername"); string id = loginHelper.getIssueID("Verify Edit Partner Association Connect Username"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\VerifyEditPartnerAssociationConnectUsername.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Verify Edit Partner Association Connect Username"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Verify Edit Partner Association Connect Username"); // executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("VerifyEditPartnerAssociationConnectUsername"); executionLog.WriteInExcel("Verify Edit Partner Association Connect Username", Status, JIRA, "Agents Portal"); } }
public void createPartnerIssue() { 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 agents_PartnerAssociationHelper = new Agents_PartnerAssociationHelper(GetWebDriver()); // Variable var Name = "Testagent" + RandomNumber(111, 99999); var FirstName = "AgentQa" + RandomNumber(11, 99999); var Id = "12345" + RandomNumber(11, 999); var username1 = "testinguser" + RandomNumber(111, 999999); String JIRA = ""; String Status = "Pass"; try { executionLog.Log("CreatePartnerIssue", "Login with valid username and password"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); executionLog.Log("CreatePartnerIssue", "Verify Page title"); VerifyTitle("Dashboard"); executionLog.Log("CreatePartnerIssue", "Go To Create Partner association page"); VisitOffice("partners/associations"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("CreatePartnerIssue", "Search the name"); agents_PartnerAssociationHelper.TypeText("SearchAssociation", "AssociationTester"); agents_PartnerAssociationHelper.WaitForWorkAround(2000); var loc = "//table[@id='list1']//tr[2]//td[6]/a"; if (agents_PartnerAssociationHelper.IsElementPresent(loc)) { executionLog.Log("CreatePartnerAgentAndUserAccount", "Click On Create"); agents_PartnerAssociationHelper.clickJS("CreateAsso"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Salutation"); agents_PartnerAssociationHelper.Select("SelectSalutation", "Mr"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter the name"); agents_PartnerAssociationHelper.TypeText("Name", Name); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter FirstNAME"); agents_PartnerAssociationHelper.TypeText("FirstNAME", "Test Agent"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter LastName"); agents_PartnerAssociationHelper.TypeText("LastName", "Tester"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Date Of Birth"); agents_PartnerAssociationHelper.TypeText("Assobirth", "08/08/1994"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter DBAName"); agents_PartnerAssociationHelper.TypeText("DBAName", "Test DBA"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter LinkedInUrl"); agents_PartnerAssociationHelper.TypeText("LinkedInUrl", "LinkedIn.con"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter FaceBook Url"); agents_PartnerAssociationHelper.TypeText("FaceBookUrl", "Facebook.com"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter TwitterURL"); agents_PartnerAssociationHelper.TypeText("TwitterURL", "Twitter.com"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select language."); agents_PartnerAssociationHelper.Select("SelectLanguage", "English"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select eAddressType"); agents_PartnerAssociationHelper.Select("eAddressType", "E-Mail"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select eAddressLebel"); agents_PartnerAssociationHelper.Select("eAddressLebel", "Work"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter eAddressType"); var Email = "P.Agent" + GetRandomNumber() + "@yopmail.com"; agents_PartnerAssociationHelper.TypeText("eAddress", Email); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select SelectPhoneType"); agents_PartnerAssociationHelper.Select("SelectPhoneType", "Work"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter PhoneNumber"); agents_PartnerAssociationHelper.TypeText("PhoneNumber", "1212121212"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Address Type "); agents_PartnerAssociationHelper.Select("AddressType", "Office"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter AddressLine1"); agents_PartnerAssociationHelper.TypeText("AddressLine1", "FC 89"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Postal code"); agents_PartnerAssociationHelper.TypeText("PostalCode", "60601"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Username"); agents_PartnerAssociationHelper.TypeText("UserName", username1); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Avatar"); agents_PartnerAssociationHelper.ClickElement("ClickOnAvatar"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Click Save Agent btn"); agents_PartnerAssociationHelper.ClickElement("AssSave"); agents_PartnerAssociationHelper.WaitForWorkAround(5000); executionLog.Log("CreatePartnerAgentAndUserAccount", "Verify success message. "); agents_PartnerAssociationHelper.WaitForText("Partner Association Created Successfully.", 30); } else { executionLog.Log("CreatePartnerAgentAndUserAccount", "Click On Create"); agents_PartnerAssociationHelper.clickJS("CreateAsso"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Salutation"); agents_PartnerAssociationHelper.Select("SelectSalutation", "Mr"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter the name"); agents_PartnerAssociationHelper.TypeText("Name", "AssociationTester"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter FirstNAME"); agents_PartnerAssociationHelper.TypeText("FirstNAME", "Test Agent"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter LastName"); agents_PartnerAssociationHelper.TypeText("LastName", "Tester"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Date Of Birth"); agents_PartnerAssociationHelper.TypeText("Assobirth", "08/08/1994"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter DBAName"); agents_PartnerAssociationHelper.TypeText("DBAName", "Test DBA"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter LinkedInUrl"); agents_PartnerAssociationHelper.TypeText("LinkedInUrl", "LinkedIn.con"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter FaceBook Url"); agents_PartnerAssociationHelper.TypeText("FaceBookUrl", "Facebook.com"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter TwitterURL"); agents_PartnerAssociationHelper.TypeText("TwitterURL", "Twitter.com"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select language."); agents_PartnerAssociationHelper.Select("SelectLanguage", "English"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select eAddressType"); agents_PartnerAssociationHelper.Select("eAddressType", "E-Mail"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select eAddressLebel"); agents_PartnerAssociationHelper.Select("eAddressLebel", "Work"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter eAddressType"); var Email = "P.Agent" + GetRandomNumber() + "@yopmail.com"; agents_PartnerAssociationHelper.TypeText("eAddress", Email); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select SelectPhoneType"); agents_PartnerAssociationHelper.Select("SelectPhoneType", "Work"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter PhoneNumber"); agents_PartnerAssociationHelper.TypeText("PhoneNumber", "1212121212"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Address Type "); agents_PartnerAssociationHelper.Select("AddressType", "Office"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter AddressLine1"); agents_PartnerAssociationHelper.TypeText("AddressLine1", "FC 89"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Postal code"); agents_PartnerAssociationHelper.TypeText("PostalCode", "60601"); agents_PartnerAssociationHelper.WaitForWorkAround(3000); executionLog.Log("CreatePartnerAgentAndUserAccount", "Enter Username"); agents_PartnerAssociationHelper.TypeText("UserName", username1); executionLog.Log("CreatePartnerAgentAndUserAccount", "Select Avatar"); agents_PartnerAssociationHelper.ClickElement("ClickOnAvatar"); executionLog.Log("CreatePartnerAgentAndUserAccount", "Click Save Agent btn"); agents_PartnerAssociationHelper.ClickElement("AssSave"); agents_PartnerAssociationHelper.WaitForWorkAround(5000); executionLog.Log("CreatePartnerAgentAndUserAccount", "Verify success message. "); agents_PartnerAssociationHelper.WaitForText("Partner Association Created Successfully.", 30); } } catch (Exception e) { executionLog.Log("Error", e.StackTrace); Status = "Fail"; String counter = executionLog.readLastLine("counter"); String Description = executionLog.GetAllTextFile("CreatePartnerIssue"); String Error = executionLog.GetAllTextFile("Error"); if (counter == "") { counter = "0"; } bool result = loginHelper.CheckExstingIssue("Create Partner Issue"); if (!result) { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); loginHelper.CreateIssue("Create Partner Issue", "Bug", "Medium", "Create Partner page", "QA", "Log in as: " + username[0] + " / " + password[0] + "\n\nSteps:\n" + Description + "\n\n\nError Description:\n" + Error); string id = loginHelper.getIssueID("Create Partner Issue"); TakeScreenshot("CreatePartnerIssue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreatePartnerIssue.png"; loginHelper.AddAttachment(location, id); } } else { if (Int16.Parse(counter) < 9) { executionLog.Count("counter", (Int16.Parse(counter) + 1).ToString()); TakeScreenshot("CreatePartnerIssue"); string id = loginHelper.getIssueID("Create Partner Issue"); string directoryName = loginHelper.GetnewDirectoryName(GetPath()); var location = directoryName + "\\CreatePartnerIssue.png"; loginHelper.AddAttachment(location, id); loginHelper.AddComment(loginHelper.getIssueID("Create Partner Issue"), "This issue is still occurring"); } } JIRA = loginHelper.getIssueID("Create Partner Issue"); executionLog.DeleteFile("Error"); throw; } finally { executionLog.DeleteFile("CreatePartnerIssue"); executionLog.WriteInExcel("Create Partner Issue", Status, JIRA, "Partner Portal"); } }