public void createUserError1() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); //Go to Create user page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/users/create"); //Verify title VerifyTitle("Create User"); //Select User type partnerAgentHelperNewSkin.SelectByText("Usertype", "Employee"); //Click on Create new partnerAgentHelperNewSkin.ClickElement("UserCreate"); //Enter first name partnerAgentHelperNewSkin.TypeText("UserFirstName", "Aslam"); //Enter last Name partnerAgentHelperNewSkin.TypeText("UserLastName", "Khan"); //Enter existing user name partnerAgentHelperNewSkin.TypeText("Userusername", username[0]); //Enter primary email partnerAgentHelperNewSkin.TypeText("UserEmail", "*****@*****.**"); //Click on 'Save' button partnerAgentHelperNewSkin.ClickElement("UserSave"); //Wait for text partnerAgentHelperNewSkin.WaitForText("This username already taken", 50); //Verify error not displayed partnerAgentHelperNewSkin.VerifyTextNotPresent("Internal server error page"); //Logout from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void createClientError() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //navigate to the Create client page. GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients/create"); //verify title VerifyTitle("Create a Client"); //Select Status partnerAgentHelperNewSkin.SelectByText("ClientStatus", "Agreement"); //Select Responsibility partnerAgentHelperNewSkin.SelectByText("ClientRespo", "Aslam Khan"); //Click on Company details tab partnerAgentHelperNewSkin.ClickElement("ClientCompany"); //Verify field available for company DBA name partnerAgentHelperNewSkin.verifyElementPresent("ClientDBAName"); //Enter DBA name partnerAgentHelperNewSkin.TypeText("ClientDBAName", "DBA"); //Enter legal name partnerAgentHelperNewSkin.TypeText("ClientLegalName", RandomNumber(1,1000).ToString()); //Click on Save button partnerAgentHelperNewSkin.ClickElement("OfficeSave"); //Verify error not displayed partnerAgentHelperNewSkin.VerifyTextNotPresent("Already Exist"); }
public void manageMultipleSysprins() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username2"); password = oXMLData.getData("settings/Credentials", "password2"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to office code management GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/office_codes_management"); //Verify title VerifyTitle("Office Codes Management"); //Select Sysprins partnerAgentHelperNewSkin.SelectByText("SelectSys", "Sysprins"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Enter value1 partnerAgentHelperNewSkin.TypeText("Value1", GetRandomNumber().ToString()); partnerAgentHelperNewSkin.WaitForWorkAround(1000); //Click on Add button partnerAgentHelperNewSkin.ClickElement("AddAnother"); //Enter value2 partnerAgentHelperNewSkin.TypeText("Value2", GetRandomNumber().ToString()); partnerAgentHelperNewSkin.WaitForWorkAround(1000); //Click on Save button partnerAgentHelperNewSkin.ClickElement("RMPSave"); //Click on Save button partnerAgentHelperNewSkin.WaitForText("Office codes updated successfully.", 30); }
public void loginError1() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Verify title VerifyTitle("Login"); //Click on Verify my account partnerAgentHelperNewSkin.ClickElement("VerifyAccount"); //Enter username partnerAgentHelperNewSkin.TypeText("VerifyUsername", "aslamKhan"); //Click on V partnerAgentHelperNewSkin.ClickElement("VerifyBody"); //Refresh the page RefreshPage(); //Verify title VerifyTitle("Login"); //Click on Verify my account partnerAgentHelperNewSkin.ClickElement("VerifyAccount"); //Verify field is blank partnerAgentHelperNewSkin.VerifyTextNotPresent("aslamKhan"); //Enter username partnerAgentHelperNewSkin.TypeText("VerifyUsername", "aslamKhan"); //Click on Send email button partnerAgentHelperNewSkin.ClickElement("VerifySend"); //Wait for text partnerAgentHelperNewSkin.WaitForText("Your email is already verified",30); }
public void verifyMyAccount() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Verify title VerifyTitle("Login"); //Click on Verify my account partnerAgentHelperNewSkin.ClickElement("VerifyAccount"); //Enter username partnerAgentHelperNewSkin.TypeText("VerifyUsername", "aslamKhan"); //Click on V partnerAgentHelperNewSkin.ClickElement("VerifyBody"); //Verify error not displayed partnerAgentHelperNewSkin.VerifyTextNotPresent("Please include an '@' in the email address"); }
public void fieldDictionaryFields() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Field Dictionary Fields page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/fields"); //Verify Title VerifyTitle("Field Management"); //Select Module partnerAgentHelperNewSkin.SelectByText("FSModule", "Clients"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Select Tab partnerAgentHelperNewSkin.SelectByText("FSTab", "Company Details"); //Click on Search Button partnerAgentHelperNewSkin.ClickElement("FSSearch"); //Verify field availabe partnerAgentHelperNewSkin.verifyElementPresent("FSFilter"); //Enter mail partnerAgentHelperNewSkin.TypeText("FSFilter", "Mail"); //Click on Mail partnerAgentHelperNewSkin.ClickElement("FSMail"); //Verify Manage button available partnerAgentHelperNewSkin.verifyElementPresent("FSManage"); //Log out from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void sysPRNIssue1() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username2"); password = oXMLData.getData("settings/Credentials", "password2"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to office code management GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/office_codes_management"); //Verify title VerifyTitle("Office Codes Management"); //Select Sysprins partnerAgentHelperNewSkin.SelectByText("SelectSys", "Sysprins"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Enter value1 partnerAgentHelperNewSkin.TypeText("Value1", GetRandomNumber().ToString()); //Click on Add button partnerAgentHelperNewSkin.ClickElement("AddAnother"); partnerAgentHelperNewSkin.WaitForWorkAround(1000); //Click on Second primary option partnerAgentHelperNewSkin.ClickElement("SecOp"); //Click on Save button partnerAgentHelperNewSkin.ClickElement("RMPSave"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); // verify error not displayed //partnerAgentHelperNewSkin.VerifyTextNotAvailable("blank Sys/Prin Number has been removed and now there is no longer a Primary Sys/Prin"); }
public void createPickList() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to picklist page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/pick-lists"); //Verify title VerifyTitle("Picklists"); // Open the first picklist partnerAgentHelperNewSkin.ClickElement("EditPick"); //Veirfy title VerifyTitle("Add/Edit Picklist Items"); //Click on Add button partnerAgentHelperNewSkin.ClickElement("AddPick"); partnerAgentHelperNewSkin.WaitForWorkAround(2000); //Enter name partnerAgentHelperNewSkin.TypeText("PickType","Pick"+GetRandomNumber()); //Click on Save button partnerAgentHelperNewSkin.ClickElement("PickSave"); //Wait for text partnerAgentHelperNewSkin.WaitForText("The picklist value is added successfully", 30); //Logout from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void vendorEmailVerification() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Visit to create vendor page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/vendors/create"); //Verify title VerifyTitle("Create a New Vendor"); //Click on 'Save' button without entering details partnerAgentHelperNewSkin.ClickElement("OfficeSave"); //Verify Validation message displayed for email partnerAgentHelperNewSkin.verifyElementPresent("EmailVerification"); //Enter invalid email partnerAgentHelperNewSkin.TypeText("EmailVendor", "INVALID"); //Click on 'Save' button after entering invalid email partnerAgentHelperNewSkin.ClickElement("OfficeSave"); //Verify email validate partnerAgentHelperNewSkin.verifyElementPresent("EmailVerification"); partnerAgentHelperNewSkin.VerifyPageText("Please enter a valid email address"); //Log out from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void shippingFilterError() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Visit to create vendor page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/shipping_carriers"); //Verify title VerifyTitle("Shipping Carriers"); //Apply Filter partnerAgentHelperNewSkin.TypeText("FilterName", GetRandomNumber().ToString()); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Verify filter available partnerAgentHelperNewSkin.verifyElementNotPresent("NonFilter"); //Click on Refresh button partnerAgentHelperNewSkin.ClickElement("RefreshButton"); //verify title VerifyTitle("Shipping Carriers"); //Verify filter reset partnerAgentHelperNewSkin.verifyElementPresent("NonFilter"); //Log out from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void loginError2() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Verify title VerifyTitle("Login"); //Click on Verify my account partnerAgentHelperNewSkin.ClickElement("VerifyAccount"); //Enter username partnerAgentHelperNewSkin.TypeText("VerifyUsername", "aa"); //Click on V partnerAgentHelperNewSkin.ClickElement("VerifyBody"); //Click on Send email button partnerAgentHelperNewSkin.ClickMultiple("VerifySend"); //Accept Alert partnerAgentHelperNewSkin.AcceptAlert(); //Enter username partnerAgentHelperNewSkin.TypeText("VerifyUsername", "aslamKhan"); }
public void createPartnerAgentAndUserAccount() { string[] username = null; string[] password = null; XMLParse oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects LoginHelper loginHelper = new LoginHelper(GetWebDriver()); ClientsHelper clientHelper = new ClientsHelper(GetWebDriver()); CreateAgentHelper createAgentHelper = new CreateAgentHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Variable String name = "TestAgent" + GetRandomNumber(); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Click on Agent in Topmenu partnerAgentHelperNewSkin.MouseHover("ClickOnAgentTab"); //################################# CREATE A agent ############################################# //Click on Click On Partner Agent GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/partners/agents"); //Click On Create partnerAgentHelperNewSkin.ClickElement("ClickOnCreatebtnAdjmnt"); //Select Salutation partnerAgentHelperNewSkin.Select("SelectSalutation", "Mr"); //Enter FirstNAME partnerAgentHelperNewSkin.TypeText("FirstNAME", "Test Agent"); //Enter LastName partnerAgentHelperNewSkin.TypeText("LastName", "Tester"); //Enter Date Of Birth partnerAgentHelperNewSkin.TypeText("BirthDay", "1991-03-02"); //Click on Middle name partnerAgentHelperNewSkin.ClickElement("ClickMiddleName"); //Enter DBAName partnerAgentHelperNewSkin.TypeText("DBAName", "Test DBA"); //Enter LinkedInUrl partnerAgentHelperNewSkin.TypeText("LinkedInUrl", "LinkedIn.con"); //Enter FaceBook Url partnerAgentHelperNewSkin.TypeText("FaceBookUrl", "Facebook.com"); //Enter TwitterURL partnerAgentHelperNewSkin.TypeText("TwitterURL", "Twitter.com"); //Enter DBAName partnerAgentHelperNewSkin.Select("SelectLanguage", "English"); //############### CONTACT INFORMATION ################################### //Enter eAddressType partnerAgentHelperNewSkin.Select("eAddressType", "E-Mail"); //Enter eAddressLebel partnerAgentHelperNewSkin.Select("eAddressLebel", "Work"); //Enter eAddressType var Email = "P.Agent" + RandomNumber(1, 999) + "@yopmail.com"; partnerAgentHelperNewSkin.TypeText("eAddress", Email); //################## PHONE ########################### //Enter SelectPhoneType partnerAgentHelperNewSkin.Select("SelectPhoneType", "Work"); //Enter PhoneNumber partnerAgentHelperNewSkin.TypeText("PhoneNumber", "1212121212"); //##################### ADDRESS TYPE //Enter Address Type partnerAgentHelperNewSkin.Select("AddressType", "Office"); //Enter AddressLine1 partnerAgentHelperNewSkin.TypeText("AddressLine1", "FC 89"); //Enter City partnerAgentHelperNewSkin.TypeText("PostalCode", "60601"); partnerAgentHelperNewSkin.WaitForWorkAround(2000); //################### CREATE USER ACCOUNT //Click On Checkbox partnerAgentHelperNewSkin.ClickElement("ClickONcheckBox"); //Enter UserName partnerAgentHelperNewSkin.TypeText("UserName", name); //Click On Avatar partnerAgentHelperNewSkin.ClickElement("ClickOnAvatar"); //########### click on Save Contact //CLICK Save AGENT btn partnerAgentHelperNewSkin.ClickElement("ClickSaveNskin"); partnerAgentHelperNewSkin.WaitForWorkAround(5000); //Verify partnerAgentHelperNewSkin.VerifyPageText("The user is successfully added"); }
public void saveLocation() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Client page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients"); //Verify title VerifyTitle("Clients"); //Open a client partnerAgentHelperNewSkin.ClickElement("OpenClient"); //Verify title VerifyTitle("Company - Details"); //Click on Company detials partnerAgentHelperNewSkin.ClickElement("ComDetails"); //Verify title VerifyTitle("Company - Details"); int rand = RandomNumber(10, 1000); //Enter Location partnerAgentHelperNewSkin.TypeText("LocationOffice", rand.ToString()); //CLick on Save button partnerAgentHelperNewSkin.ClickElement("OfficeSave"); //Wait for text partnerAgentHelperNewSkin.WaitForText("Client data updated successfully.", 20); //Go to dashboard GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice"); //Verify title VerifyTitle("Dashboard"); //Go to Client page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients"); //Verify title VerifyTitle("Clients"); //Open a client partnerAgentHelperNewSkin.ClickElement("OpenClient"); //Verify title VerifyTitle("Company - Details"); //Click on Company detials partnerAgentHelperNewSkin.ClickElement("ComDetails"); //Verify title VerifyTitle("Company - Details"); //Verify location is saved partnerAgentHelperNewSkin.verifyLocationSaved("LocationOffice", rand); //Logout from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void fieldDisError() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Create template page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/field_grouping_templates"); //Verify title VerifyTitle("Field Grouping Templates"); //Click on 'Create' button partnerAgentHelperNewSkin.ClickElement("TemplateCreate"); //Enter TemplateName partnerAgentHelperNewSkin.TypeText("TemplateName", "DemoTemplate"); //Select Module partnerAgentHelperNewSkin.SelectByText("TemplaceModule", "Clients"); partnerAgentHelperNewSkin.WaitForWorkAround(2000); //Select Tab partnerAgentHelperNewSkin.SelectByText("TemplateTab", "Company Details"); partnerAgentHelperNewSkin.WaitForWorkAround(5000); //Select Field partnerAgentHelperNewSkin.SelectByText("TemplateField", "Company Legal Name"); //Click on Add Button partnerAgentHelperNewSkin.ClickElement("TemplateAdd"); //Click on Save button partnerAgentHelperNewSkin.ClickElement("OfficeSave"); //Click on Delete icon partnerAgentHelperNewSkin.ClickElement("TemplateDelete"); //Accept alert partnerAgentHelperNewSkin.AcceptAlert(); //Verify error not displayed partnerAgentHelperNewSkin.VerifyTextNotPresent("An Internal Error Has Occurred"); //Log out from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void viewRevenueAdjustmentSaleAgentPercentage() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); var saleAgentRevenueAdjustmentHelper = new SaleAgentRevenueAdjustmentHelper(GetWebDriver()); //Variable random var name = "TESTCLIENT" + RandomNumber(1,999); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //########### Search and click //Click on Residual tab // partnerAgentHelperNewSkin.ClickElement("ClickonResidualIncometab"); //Click on Masterdata // partnerAgentHelperNewSkin.ClickElement("ClickOnMasterdata"); //Redirect To URL GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/rir/adjustments_tool"); //Enter Adjustment Name // partnerAgentHelperNewSkin.TypeText("EnterAdjustmentNameSrch", "Sale Agent Adjustment"); //Enter Srch Adjustment For // partnerAgentHelperNewSkin.TypeText("EnterScrhAdjustmentFor", "Agent"); partnerAgentHelperNewSkin.WaitForWorkAround(6000); var loc = "//table[@id='list1']/tbody/tr[2]"; if (partnerAgentHelperNewSkin.IsElementPresent(loc)) { //Click on Adjustment partnerAgentHelperNewSkin.ClickElement("ClickONbUTTONtOvIEW"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Verify Adjustment Name partnerAgentHelperNewSkin.VerifyValue("EnterAdjustmentName", "Sale Agent Adjustment"); //Verify Select Rule Type partnerAgentHelperNewSkin.VerifyText("SelectRuleType", "Percentage"); //Verify Enter Amount partnerAgentHelperNewSkin.VerifyValue("EnterAmount", "20"); } else { //Click on Agent in Topmenu saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnAgentTab"); saleAgentRevenueAdjustmentHelper.WaitForWorkAround(3000); //################################# CREATE A agent ############################################# //Click on Click On Partner Agent GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/chandracorp/chandra/sales_agents"); // saleAgentRevenueAdjustmentHelper.ClickElement("SaleAgent"); //Enter agent name to search saleAgentRevenueAdjustmentHelper.TypeText("EnterAgentName", "Sale Agent Revenue Adjustment Tester"); saleAgentRevenueAdjustmentHelper.WaitForWorkAround(3000); saleAgentRevenueAdjustmentHelper.Select("SelectStatusAdjtmnt",""); saleAgentRevenueAdjustmentHelper.WaitForWorkAround(4000); var loc1 = "//table[@id='list1']/tbody/tr[2]/td[@title='Sale Agent Revenue Adjustment Tester']"; if (saleAgentRevenueAdjustmentHelper.IsElementPresent(loc1)) { //Click On Sale Agent saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnAgent1099"); //Click On Create btn Adjmnt saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnCreatebtnAdjmnt"); //Click on SaleAgent saleAgentRevenueAdjustmentHelper.ClickElement("ClickSaleManager"); //EnterAdjustmentName saleAgentRevenueAdjustmentHelper.TypeText("EnterAdjustmentName", "Sale Agent Adjustment"); //SelectAdjustmentFor saleAgentRevenueAdjustmentHelper.Select("SelectAdjustmentFor", "Agent"); //SelectAdjustmentFor saleAgentRevenueAdjustmentHelper.Select("AdjustmentType", "Transaction"); //SelectAdjustmentFor saleAgentRevenueAdjustmentHelper.Select("SelectReportingPeriod", "00"); //SelectProcessor saleAgentRevenueAdjustmentHelper.Select("SelectProcessor", "Any"); //SelectAdjustmentFor saleAgentRevenueAdjustmentHelper.Select("SelectRuleType", "1"); //Enter Amount saleAgentRevenueAdjustmentHelper.TypeText("EnterAmount", "20"); //AddRemove saleAgentRevenueAdjustmentHelper.Select("AddRemove", "Add"); //ClickOnSaveBtnAdjustmnet saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnSaveBtnAdjustmnet"); saleAgentRevenueAdjustmentHelper.WaitForWorkAround(3000); //Verify saleAgentRevenueAdjustmentHelper.VerifyPageText("Master Adjustment Rules Created Successfully."); saleAgentRevenueAdjustmentHelper.WaitForWorkAround(3000); //####################### VIEW RESIDUAL ADJUSTMENT //Click on Residual tab partnerAgentHelperNewSkin.ClickElement("ClickonResidualIncometab"); //Click on Masterdata partnerAgentHelperNewSkin.ClickElement("ClickOnMasterdata"); //Redirect To URL GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/rir/adjustments_tool"); //Enter Adjustment Name partnerAgentHelperNewSkin.TypeText("EnterAdjustmentNameSrch", "Sale Agent Adjustment"); //Enter Srch Adjustment For partnerAgentHelperNewSkin.TypeText("EnterScrhAdjustmentFor", "Agent"); partnerAgentHelperNewSkin.WaitForWorkAround(6000); //Click on Adjustment partnerAgentHelperNewSkin.ClickElement("ClickAdjustmentName"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Verify Adjustment Name partnerAgentHelperNewSkin.VerifyValue("EnterAdjustmentName", "Sale Agent Adjustment"); //Verify Select Rule Type partnerAgentHelperNewSkin.VerifyText("SelectRuleType", "Percentage"); //Verify Enter Amount partnerAgentHelperNewSkin.VerifyValue("EnterAmount", "20"); } else { //Click On Click On Create SaleBtn saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnCreateBtn"); //Select Salutation saleAgentRevenueAdjustmentHelper.Select("SelectSalutation", "Mr"); //Enter FirstNAME saleAgentRevenueAdjustmentHelper.TypeText("FirstNAME", "Sale Agent Revenue Adjustment"); //Enter LastName saleAgentRevenueAdjustmentHelper.TypeText("LastName", "Tester"); //Enter Date Of Birth saleAgentRevenueAdjustmentHelper.TypeText("BirthDay", "1991-03-02"); //############### CONTACT INFORMATION ################################### //Enter eAddressType saleAgentRevenueAdjustmentHelper.Select("eAddressType", "E-Mail"); //Enter eAddressLebel saleAgentRevenueAdjustmentHelper.Select("eAddressLebel", "Work"); //Enter eAddressType var Email = "Sale" + RandomNumber(1, 999) + "@yopmail.com"; saleAgentRevenueAdjustmentHelper.TypeText("eAddress", Email); //################## PHONE ########################### //Enter SelectPhoneType saleAgentRevenueAdjustmentHelper.Select("SelectPhoneType", "Work"); //Enter PhoneNumber saleAgentRevenueAdjustmentHelper.TypeText("PhoneNumber", "9828928943"); //##################### ADDRESS TYPE //Enter Address Type saleAgentRevenueAdjustmentHelper.Select("AddressType", "Office"); //Enter AddressLine1 saleAgentRevenueAdjustmentHelper.TypeText("AddressLine1", "FC 89"); //Enter City saleAgentRevenueAdjustmentHelper.TypeText("City", "Test City"); //Enter PhoneNumber saleAgentRevenueAdjustmentHelper.TypeText("PostalCode", "60601"); saleAgentRevenueAdjustmentHelper.WaitForWorkAround(3000); //########################## DEPARTMENT ROLE ############################### //Click On Department // saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnDeppartmentTeam"); //Select Department // saleAgentRevenueAdjustmentHelper.Select("SelectDepartment", "78"); //Select Select Role // saleAgentRevenueAdjustmentHelper.Select("SelectRole", "76"); //Select Primary Team // saleAgentRevenueAdjustmentHelper.Select("PrimaryTeam", "40"); //################### CREATE USER ACCOUNT //Click On Checkbox saleAgentRevenueAdjustmentHelper.ClickElement("ClickONcheckBox"); //Enter UserName saleAgentRevenueAdjustmentHelper.TypeText("UserName", name); //Click On Avatar saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnSAvatarBtn"); //############## click on Save Contact //CLICK DoNotSolicit saleAgentRevenueAdjustmentHelper.ClickElement("ClickSaveNskin"); //Enter agent name to search saleAgentRevenueAdjustmentHelper.TypeText("EnterAgentName", "Sale Agent Revenue Adjustment Tester"); saleAgentRevenueAdjustmentHelper.Select("SelectStatusAdjtmnt", ""); saleAgentRevenueAdjustmentHelper.WaitForWorkAround(4000); //Click On Sale Agent saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnAgent1099"); //Click On Create btn Adjmnt saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnCreatebtnAdjmnt"); //Click on SaleAgent saleAgentRevenueAdjustmentHelper.ClickElement("ClickSaleManager"); //EnterAdjustmentName saleAgentRevenueAdjustmentHelper.TypeText("EnterAdjustmentName", "Sale Agent Adjustment"); //SelectAdjustmentFor saleAgentRevenueAdjustmentHelper.Select("SelectAdjustmentFor", "Agent"); //SelectAdjustmentFor saleAgentRevenueAdjustmentHelper.Select("AdjustmentType", "Transaction"); //SelectAdjustmentFor saleAgentRevenueAdjustmentHelper.Select("SelectReportingPeriod", "00"); //SelectProcessor saleAgentRevenueAdjustmentHelper.Select("SelectProcessor", "Any"); //SelectAdjustmentFor saleAgentRevenueAdjustmentHelper.Select("SelectRuleType", "1"); //Enter Amount saleAgentRevenueAdjustmentHelper.TypeText("EnterAmount", "20"); //AddRemove saleAgentRevenueAdjustmentHelper.Select("AddRemove", "Add"); //ClickOnSaveBtnAdjustmnet saleAgentRevenueAdjustmentHelper.ClickElement("ClickOnSaveBtnAdjustmnet"); saleAgentRevenueAdjustmentHelper.WaitForWorkAround(3000); //Verify saleAgentRevenueAdjustmentHelper.VerifyPageText("Master Adjustment Rules Created Successfully."); saleAgentRevenueAdjustmentHelper.WaitForWorkAround(3000); //####################### VIEW RESIDUAL ADJUSTMENT //Click on Residual tab partnerAgentHelperNewSkin.ClickElement("ClickonResidualIncometab"); //Click on Masterdata partnerAgentHelperNewSkin.ClickElement("ClickOnMasterdata"); //Redirect To URL GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/rir/adjustments_tool"); //Enter Adjustment Name partnerAgentHelperNewSkin.TypeText("EnterAdjustmentNameSrch", "Sale Agent Adjustment"); //Enter Srch Adjustment For partnerAgentHelperNewSkin.TypeText("EnterScrhAdjustmentFor", "Agent"); partnerAgentHelperNewSkin.WaitForWorkAround(6000); //Click on Adjustment partnerAgentHelperNewSkin.ClickElement("ClickAdjustmentName"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Verify Adjustment Name partnerAgentHelperNewSkin.VerifyValue("EnterAdjustmentName", "Sale Agent Adjustment"); //Verify Select Rule Type partnerAgentHelperNewSkin.VerifyText("SelectRuleType", "Percentage"); //Verify Enter Amount partnerAgentHelperNewSkin.VerifyValue("EnterAmount", "20"); } } }
public void deleteIndividualRevenue() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Client page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients"); //Verify title VerifyTitle("Clients"); //Open on a clint partnerAgentHelperNewSkin.ClickElement("Client"); //Verify title VerifyTitle("Company - Details"); //Click on residual income partnerAgentHelperNewSkin.ClickElement("ClientIncome"); //Verify title VerifyTitle(" - Residual Income"); //Click on Set parnter revenue partnerAgentHelperNewSkin.doubleClick("PartnerShare"); //Enter details partnerAgentHelperNewSkin.TypeText("ParnterShareInput", "1000"); //Click on Save button partnerAgentHelperNewSkin.ClickElement("PartnerShareSave"); //Verify title VerifyTitle(" - Residual Income"); //Click on delete button partnerAgentHelperNewSkin.ClickElement("PartnerShareDelete"); //Accept alert partnerAgentHelperNewSkin.AcceptAlert(); //Verify deleted successfully partnerAgentHelperNewSkin.WaitForTextHide("1000",20); //Verify title VerifyTitle(" - Residual Income"); //Click on Set parnter revenue partnerAgentHelperNewSkin.doubleClick("PartnerAgent"); //Enter details partnerAgentHelperNewSkin.TypeText("PartnerAgentInput", "1000"); //Click on Save button partnerAgentHelperNewSkin.ClickElement("PartternAgentSave"); //Verify title VerifyTitle(" - Residual Income"); //Click on delete button partnerAgentHelperNewSkin.ClickElement("PartnerShareDelete"); //Accept alert partnerAgentHelperNewSkin.AcceptAlert(); //Verify deleted successfully partnerAgentHelperNewSkin.WaitForTextHide("1000", 20); //Logout from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void languageNameValidation() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username2"); password = oXMLData.getData("settings/Credentials", "password2"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); //Go to Language page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/languages"); //Verify title VerifyTitle("Languages"); //Click on 'Create' button partnerAgentHelperNewSkin.ClickElement("LanguageCreate"); //Wait for text partnerAgentHelperNewSkin.WaitForText("Add New Language", 30); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Enter language name partnerAgentHelperNewSkin.TypeText("LanguageName", "Test"); //Click on Save button partnerAgentHelperNewSkin.ClickElement("LanguageSave"); //Wait for text partnerAgentHelperNewSkin.WaitForText("Language Created Successfully",40); //Click on Edit button partnerAgentHelperNewSkin.ClickElement("LanguageEdit"); //Remove text from the field partnerAgentHelperNewSkin.removeText("LanguageBlank"); //Click on box partnerAgentHelperNewSkin.Click("//div[@class='ibox-title']"); //Click on Save button partnerAgentHelperNewSkin.ClickElement("LanguageSave1"); //Verify error message partnerAgentHelperNewSkin.VerifyPageText("Name: Field is required"); //Click on Close button partnerAgentHelperNewSkin.ClickElement("LanguageClose"); //Click on Cancel button partnerAgentHelperNewSkin.ClickElement("LanguageCancel"); //Click on Delete button partnerAgentHelperNewSkin.ClickElement("LanguageDelete"); //Click on OK button partnerAgentHelperNewSkin.ClickElement("LanguageOK"); //verify language deleted //partnerAgentHelperNewSkin. //Logout from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void residualAdjustmentTool() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username2"); password = oXMLData.getData("settings/Credentials", "password2"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Create Residual Adjustment Tool page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/rir/create"); //Verify title VerifyTitle("Residual Master Rules - Create Adjustments"); //Click on 'Save' button without filling any field partnerAgentHelperNewSkin.ClickElement("RMPSave"); //Verify error message partnerAgentHelperNewSkin.verifyElementPresent("RMPProcessorError"); partnerAgentHelperNewSkin.verifyElementPresent("RMPSetNameError"); //Select Processor partnerAgentHelperNewSkin.SelectByText("RMPProcessor", "Chy Processor"); //Click on 'Save' button after selecting Processor partnerAgentHelperNewSkin.ClickElement("RMPSave"); //Verify error partnerAgentHelperNewSkin.verifyElementPresent("RMPSetNameError"); //Select Ammount partnerAgentHelperNewSkin.SelectByText("RMPRule", "Amount"); //Enter amount in alphabets partnerAgentHelperNewSkin.TypeText("RMPRuleField", "Alpha"); //Click on v partnerAgentHelperNewSkin.ClickElement("RMPRule"); //Verify error displayed partnerAgentHelperNewSkin.verifyElementPresent("RMPRuleError"); //Enter amount in numeric partnerAgentHelperNewSkin.TypeText("RMPRuleField", "123"); //Click on v partnerAgentHelperNewSkin.ClickElement("RMPRule"); //Select Percantage partnerAgentHelperNewSkin.SelectByText("RMPRule", "Percentage"); //Enter Percantage in alphabets partnerAgentHelperNewSkin.TypeText("RMPRuleField", "Alpha"); //Click on v partnerAgentHelperNewSkin.ClickElement("RMPRule"); //Verify error displayed partnerAgentHelperNewSkin.verifyElementPresent("RMPRuleError"); //Enter Percantage in numeric partnerAgentHelperNewSkin.TypeText("RMPRuleField", "13"); //Click on v partnerAgentHelperNewSkin.ClickElement("RMPRule"); //Verify error not displayed // partnerAgentHelperNewSkin.verifyElementNotPresent("RMPRuleError"); //Select Ammount partnerAgentHelperNewSkin.SelectByText("RMPRule", "Amount"); //Enter Ammount upto 3 decimal partnerAgentHelperNewSkin.TypeText("RMPRuleField", "123.234"); //Click on v partnerAgentHelperNewSkin.ClickElement("RMPRule"); //Verify error displayed partnerAgentHelperNewSkin.verifyElementPresent("RMPRuleError"); //Select Percantage partnerAgentHelperNewSkin.SelectByText("RMPRule", "Percentage"); //Enter Percantage more than 100 partnerAgentHelperNewSkin.TypeText("RMPRuleField", "1234"); //Click on v partnerAgentHelperNewSkin.ClickElement("RMPRule"); //Verify error displayed partnerAgentHelperNewSkin.verifyElementPresent("RMPRuleError"); //Click on Add another button. partnerAgentHelperNewSkin.ClickElement("RMPAddRule"); //Verify Field added partnerAgentHelperNewSkin.verifyElementPresent("RMPRuleError"); //Enter ammount //Log out from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void deleteEmployee() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username2"); password = oXMLData.getData("settings/Credentials", "password2"); log = oXMLData.getData("settings/URL", "logout"); var name = "TestEmployee" + RandomNumber(0,99); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Employee page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/employees/create"); //verify title VerifyTitle("Employees"); //Enter name partnerAgentHelperNewSkin.TypeText("EmployeeUsername", name); //Enter email partnerAgentHelperNewSkin.TypeText("EmployeeEmail", name + "@yopmail.com"); //Enter firstname partnerAgentHelperNewSkin.TypeText("EmployeeFirst", name); //Enter lastname partnerAgentHelperNewSkin.TypeText("EmployeeLast", "Last"); //Check the box partnerAgentHelperNewSkin.ClickElement("EmployeeCheck"); //Enter phone partnerAgentHelperNewSkin.TypeText("EmployeePhone", "(2134551231"); //Enter e adree partnerAgentHelperNewSkin.TypeText("EmployeeEAddress", name + "@yopmail.com"); //Click on save button partnerAgentHelperNewSkin.ClickElement("EmployeeSave"); //Wait for text partnerAgentHelperNewSkin.WaitForText("Refresh",30); //Verify title VerifyTitle("Employees"); //Logout from the application GetWebDriver().Navigate().GoToUrl(log[0]); //Verify title VerifyTitle("Login"); //Redirect to yopmail GetWebDriver().Navigate().GoToUrl("http://www.yopmail.com/en/"); //Verify title VerifyTitle("YOPmail"); //Enter email partnerAgentHelperNewSkin.TypeText("Yopmail", name); //Click on button partnerAgentHelperNewSkin.ClickElement("YopmailClick"); partnerAgentHelperNewSkin.WaitForWorkAround(5000); //Switch to frame partnerAgentHelperNewSkin.switchFrame("ifinbox"); //Click on Mail partnerAgentHelperNewSkin.ClickElement("UserMail"); //Switch to default GetWebDriver().SwitchTo().DefaultContent(); //Switch to frame partnerAgentHelperNewSkin.switchFrame("ifmail"); //Click on URL partnerAgentHelperNewSkin.ClickElement("OfficeLink"); //Switch window partnerAgentHelperNewSkin.SwitchNewWindow("Login"); //Verify message partnerAgentHelperNewSkin.WaitForText("Thank you, your account is activated now", 30); //Verify title VerifyTitle("Login"); Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Employee page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/employees/"); //verify title VerifyTitle("Employees"); //scroll to element partnerAgentHelperNewSkin.scrollToElement("SelectList"); //Select 1000 partnerAgentHelperNewSkin.SelectByText("SelectList", "1000"); //verify title VerifyTitle("Employees"); //Open user profile partnerAgentHelperNewSkin.Click("//a[contains(text(),'"+name+"')]"); //Wait for text partnerAgentHelperNewSkin.WaitForText("Disable", 30); //Click on Disable button partnerAgentHelperNewSkin.ClickElement("UserDisable"); //Type text partnerAgentHelperNewSkin.TypeInArea("DisableArea", "Testing"); //Click on Disable overlay partnerAgentHelperNewSkin.ClickElement("UserOverlayDisable"); }
public void revenueShareInDecimalPartnerAgent() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Variable var name = "TestAgent" + GetRandomNumber(); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Click on Agent in Topmenu partnerAgentHelperNewSkin.MouseHover("ClickOnAgentTab"); //################################# CREATE A agent ############################################# //Click on Click On Partner Agen GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/partners/agents"); //verify title VerifyTitle("Partner Agents"); //ClickOnRevenueShare partnerAgentHelperNewSkin.ClickElement("RevenueSahrnepartneragent"); //Verify title VerifyTitle("Partner Agent Codes and Revenue Shares"); //Click on Revenue Share Partner Agnet partnerAgentHelperNewSkin.ClickElement("AddANewAgentRevenueSahre"); partnerAgentHelperNewSkin.WaitForWorkAround(5000); //SelectPartnerAgnetRS partnerAgentHelperNewSkin.SelectByText("SelectPartnerAgnetRS", "Chy Processor"); //EnterPartnerCode var code = "1" + RandomNumber(99,999); partnerAgentHelperNewSkin.TypeText("EnterPartnerCode",code); //EnterPartnerCode var RS = "22." + RandomNumber(1,99); partnerAgentHelperNewSkin.TypeText("RevenueShare", RS); //ClickOnSaveRS partnerAgentHelperNewSkin.ClickElement("ClickOnSaveRS"); partnerAgentHelperNewSkin.WaitForWorkAround(4000); //verify message Partner agent code & revenue share saved successfully. partnerAgentHelperNewSkin.WaitForText("revenue share saved successfully.",20); partnerAgentHelperNewSkin.WaitForWorkAround(4000); //Verify title VerifyTitle("Partner Agent Codes and Revenue Shares"); //Enter Deciaml value partnerAgentHelperNewSkin.TypeText("SearchDeciaml", RS); partnerAgentHelperNewSkin.WaitForWorkAround(4000); //Verify value oin decimal partnerAgentHelperNewSkin.VerifyText("VerifyValueInDecimal", RS); partnerAgentHelperNewSkin.WaitForWorkAround(4000); }
public void revenueAdjustmentPartnerAgentRemoveFlatAmount() { string[] username = null; string[] password = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Variable var name = "TestAgent" + GetRandomNumber(); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Click on Agent in Topmenu partnerAgentHelperNewSkin.MouseHover("ClickOnAgentTab"); //################################# CREATE A agent ############################################# //Click on Click On Partner Agent GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/partners/agents"); //########### Search and click //Enter // partnerAgentHelperNewSkin.TypeText("EnterAgentName", "Partner Agent Tester"); // partnerAgentHelperNewSkin.Select("SelectStatusAdjtmnt", ""); partnerAgentHelperNewSkin.WaitForWorkAround(3000); var loc = "//table[@id='list1']/tbody/tr[2]"; if (partnerAgentHelperNewSkin.IsElementPresent(loc)) { //Click On Sale Agent partnerAgentHelperNewSkin.ClickElement("ClikOnPartnerAgent"); //scroll to element partnerAgentHelperNewSkin.scrollToElement("ClickOnCreatebtnAdjmnt"); //Click On Create btn Adjmnt partnerAgentHelperNewSkin.ClickElement("ClickOnCreatebtnAdjmnt"); //EnterAdjustmentName partnerAgentHelperNewSkin.TypeText("EnterAdjustmentName", "SaleAdjustment"); //SelectAdjustmentFor partnerAgentHelperNewSkin.Select("SelectAdjustmentFor", "Agent"); //SelectAdjustmentFor partnerAgentHelperNewSkin.Select("AdjustmentType", "Transaction"); //SelectAdjustmentFor partnerAgentHelperNewSkin.Select("SelectReportingPeriod", "00"); //SelectProcessor partnerAgentHelperNewSkin.Select("SelectProcessor", "Any"); //SelectAdjustmentFor partnerAgentHelperNewSkin.Select("SelectRuleType", "1"); //Enter Amount partnerAgentHelperNewSkin.TypeText("EnterAmount", "20"); //AddRemove partnerAgentHelperNewSkin.Select("AddRemove", "Add"); //ClickOnSaveBtnAdjustmnet partnerAgentHelperNewSkin.ClickElement("ClickOnSaveBtnAdjustmnet"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Verify partnerAgentHelperNewSkin.VerifyPageText("Master Adjustment Rules Created Successfully."); } else { //Click On Create partnerAgentHelperNewSkin.ClickElement("ClickOnCreateBtn"); //Select Salutation partnerAgentHelperNewSkin.Select("SelectSalutation", "Mr"); //Enter FirstNAME partnerAgentHelperNewSkin.TypeText("FirstNAME", "Partner Agent"); //Enter LastName partnerAgentHelperNewSkin.TypeText("LastName", "Tester"); //Enter Date Of Birth partnerAgentHelperNewSkin.TypeText("BirthDay", "1991-03-02"); //Click on Middle name partnerAgentHelperNewSkin.ClickElement("ClickMiddleName"); //Enter DBAName partnerAgentHelperNewSkin.TypeText("DBAName", "Test DBA"); //Enter LinkedInUrl partnerAgentHelperNewSkin.TypeText("LinkedInUrl", "LinkedIn.con"); //Enter FaceBook Url partnerAgentHelperNewSkin.TypeText("FaceBookUrl", "Facebook.com"); //Enter TwitterURL partnerAgentHelperNewSkin.TypeText("TwitterURL", "Twitter.com"); //Enter DBAName partnerAgentHelperNewSkin.Select("SelectLanguage", "English"); //############### CONTACT INFORMATION ################################### //Enter eAddressType partnerAgentHelperNewSkin.Select("eAddressType", "E-Mail"); //Enter eAddressLebel partnerAgentHelperNewSkin.Select("eAddressLebel", "Work"); //Enter eAddressType var Email = "P.Agent" + RandomNumber(1, 999) + "@yopmail.com"; partnerAgentHelperNewSkin.TypeText("eAddress", Email); //################## PHONE ########################### //Enter SelectPhoneType partnerAgentHelperNewSkin.Select("SelectPhoneType", "Work"); //Enter PhoneNumber partnerAgentHelperNewSkin.TypeText("PhoneNumber", "1212121212"); //##################### ADDRESS TYPE //Enter Address Type partnerAgentHelperNewSkin.Select("AddressType", "Office"); //Enter AddressLine1 partnerAgentHelperNewSkin.TypeText("AddressLine1", "FC 89"); //Enter City partnerAgentHelperNewSkin.TypeText("PostalCode", "60601"); partnerAgentHelperNewSkin.WaitForWorkAround(2000); //################### CREATE USER ACCOUNT //Click On Checkbox partnerAgentHelperNewSkin.ClickElement("ClickONcheckBox"); //Enter UserName partnerAgentHelperNewSkin.TypeText("UserName", name); //Click On Avatar partnerAgentHelperNewSkin.ClickElement("ClickOnAvatar"); //########### click on Save Contact //CLICK Save AGENT btn partnerAgentHelperNewSkin.ClickElement("ClickSaveNskin"); partnerAgentHelperNewSkin.WaitForWorkAround(5000); //Verify Text partnerAgentHelperNewSkin.VerifyPageText("The user is successfully added"); partnerAgentHelperNewSkin.WaitForWorkAround(5000); //Crearte Adjustment /* //Enter partnerAgentHelperNewSkin.TypeText("EnterAgentName", "Partner Agent Tester"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Click On Sale Agent partnerAgentHelperNewSkin.ClickElement("ClikOnPartnerAgent"); */ //Click On Create btn Adjmnt partnerAgentHelperNewSkin.ClickElement("ClickOnCreatebtnAdjmnt"); //EnterAdjustmentName partnerAgentHelperNewSkin.TypeText("EnterAdjustmentName", "SaleAdjustment"); //SelectAdjustmentFor partnerAgentHelperNewSkin.Select("SelectAdjustmentFor", "Agent"); //SelectAdjustmentFor partnerAgentHelperNewSkin.Select("AdjustmentType", "Transaction"); //SelectAdjustmentFor partnerAgentHelperNewSkin.Select("SelectReportingPeriod", "00"); //SelectProcessor partnerAgentHelperNewSkin.Select("SelectProcessor", "Any"); //SelectAdjustmentFor partnerAgentHelperNewSkin.Select("SelectRuleType", "1"); //Enter Amount partnerAgentHelperNewSkin.TypeText("EnterAmount", "200"); //AddRemove partnerAgentHelperNewSkin.Select("AddRemove", "Remove"); //ClickOnSaveBtnAdjustmnet partnerAgentHelperNewSkin.ClickElement("ClickOnSaveBtnAdjustmnet"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Verify partnerAgentHelperNewSkin.VerifyPageText("Master Adjustment Rules Created Successfully."); } }
public void zipCodeError() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Create Opportunity page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/opportunities/create"); //Verify title VerifyTitle("Create an Opportunity"); //Enter zip code partnerAgentHelperNewSkin.TypeText("ZipCode", "60601"); //Click On V partnerAgentHelperNewSkin.ClickElement("V"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Go to Create lead page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/leads/create"); //Verify title VerifyTitle("Create a Lead"); //Click on Company detils partnerAgentHelperNewSkin.ClickElement("ComDetails"); //Verify title VerifyTitle("Create a Lead"); //Enter zip code partnerAgentHelperNewSkin.TypeText("LeadZip", "60601"); //Click partnerAgentHelperNewSkin.ClickElement("V1"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Go to Create Client page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients/create"); //Verify title VerifyTitle("Create a Client"); //Click on Contacts tab partnerAgentHelperNewSkin.ClickElement("ConTab"); //Verify title VerifyTitle("Create a Client"); //Enter zip code partnerAgentHelperNewSkin.TypeText("ClientZip", "60601"); //Click partnerAgentHelperNewSkin.ClickElement("V2"); partnerAgentHelperNewSkin.WaitForWorkAround(3000); //Logout from the application GetWebDriver().Navigate().GoToUrl(log[0]); }
public void residualAdjustmentTool1() { string[] username = null; string[] password = null; string[] log = null; var oXMLData = new XMLParse(); oXMLData.LoadXML("../../Config/ApplicationSettings.xml"); username = oXMLData.getData("settings/Credentials", "username"); password = oXMLData.getData("settings/Credentials", "password"); log = oXMLData.getData("settings/URL", "logout"); //Initializing the objects var loginHelper = new LoginHelper(GetWebDriver()); var clientHelper = new ClientsHelper(GetWebDriver()); var partnerAgentHelperNewSkin = new PartnerAgentHelperNewSkin(GetWebDriver()); //Login with valid username and password Login(username[0], password[0]); Console.WriteLine("Logged in as: " + username[0] + " / " + password[0]); //Verify Page title VerifyTitle("Dashboard"); Console.WriteLine("Redirected at Dashboard screen."); //Go to Create Residual Adjustment Tool page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/rir/adjustments_tool/create"); //Verify title VerifyTitle("Create Adjustment"); //Select Merchant partnerAgentHelperNewSkin.SelectByText("RPMAdjust", "Agent"); //Click on specific agent partnerAgentHelperNewSkin.ClickElement("RPMSpeficAgent"); //Click on 'Select agent' partnerAgentHelperNewSkin.ClickElement("RPMSelectAgent"); //Verify Page is clickable partnerAgentHelperNewSkin.ClickElement("RPMClose"); //Click on Specific Merchant partnerAgentHelperNewSkin.ClickElement("RPMSpeficMerchant"); //Click on 'Select marchent' partnerAgentHelperNewSkin.ClickElement("RPMSelectMerchant"); //Verify Page is clickable partnerAgentHelperNewSkin.ClickElement("RPMClose"); //Select Proseccor partnerAgentHelperNewSkin.SelectByText("RPMSelectProcessor", "Chy Processor"); //Verify file format contains dropdown partnerAgentHelperNewSkin.verifyElementPresent("RPMFileFormat"); //Select type partnerAgentHelperNewSkin.SelectByText("RPMType", "Transaction"); //Enter Name partnerAgentHelperNewSkin.TypeText("RPMName", "Demo"); //Click on Save button partnerAgentHelperNewSkin.ClickElement("ClickOnSaveBtnAdjustmnet"); //Go to Residual Adjustment Tool page GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/rir/adjustments_tool"); //Verify title VerifyTitle("Adjustments Tool"); //Click on Reporting Period partnerAgentHelperNewSkin.ClickElement("RPMPeriod"); //Verify Calendar available partnerAgentHelperNewSkin.verifyElementPresent("RPMCalender"); //Enter ammount //Log out from the application GetWebDriver().Navigate().GoToUrl(log[0]); }