public void blankSubjectValidation()
        {
            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 Opportunities page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/opportunities");

            //Verify title
            VerifyTitle("Opportunities");

               //Open an opportunities
            partnerAgentHelperNewSkin.ClickElement("OpenOpportunities");

            //Verify title
            VerifyTitle("Details");

            //Click on Add note button
            partnerAgentHelperNewSkin.ClickElement("AddNote");

            //Wait for text
            partnerAgentHelperNewSkin.WaitForText("Create a Note", 30);

            //Click on Save button without subject
            partnerAgentHelperNewSkin.ClickElement("ClickOnSaveBtnAdjustmnet");

            //Verify validation message
            partnerAgentHelperNewSkin.verifyElementPresent("NoteError");
            partnerAgentHelperNewSkin.WaitForText("This field is required",30);

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
        public void verifyMailMessage()
        {
            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.");

            //Visit to Report page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/rir/reports");

            //Verify title
            VerifyTitle("Residual Income - Reports");

               //Select Office
            partnerAgentHelperNewSkin.ClickElement("SelOffice");

            //Wait for text in page
            partnerAgentHelperNewSkin.WaitForText("SelCorp Residual Reports", 30);

            //Click on Send button
            partnerAgentHelperNewSkin.ClickElement("SendMail");

            //Wait for text
            partnerAgentHelperNewSkin.WaitForText("From",30);

            //Click On Send button
            partnerAgentHelperNewSkin.ClickElement("MailSend");

            //Wait for text
            partnerAgentHelperNewSkin.WaitForText("Report Mail Sent Successfully.", 30);

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
        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 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);
        }
Esempio n. 5
0
        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]);
        }
Esempio n. 6
0
        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 verifySuccessMessage()
        {
            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 Import Leads page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/leads/import");

            //Verify title
            VerifyTitle("Leads");

            string file = GetPathToFile() + "leadslist.csv";

            //Uplaod file
            partnerAgentHelperNewSkin.UploadFile("//*[@id='vcard_file']", file);

            //Click on Import button
            partnerAgentHelperNewSkin.ClickElement("LeadImport");

            //Verify success message
            partnerAgentHelperNewSkin.WaitForText("Records Imported Successfully.",20);

            //Enter ammount
            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
        public void additionalFilter()
        {
            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 payment page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/rir/detailed_payouts");

            //verify title
            VerifyTitle("Residual Income - Payouts");

            //Click on Filter
            partnerAgentHelperNewSkin.ClickElement("Advance");

            //Wait for text
            partnerAgentHelperNewSkin.WaitForText("Filter By Additional Fields", 20);

            //Verify User is able to select TransactionFile
            partnerAgentHelperNewSkin.SelectByText("TraFile", "Amex Return Sales");
            partnerAgentHelperNewSkin.SelectByText("TraFile", "Amex Return Transactions");
            partnerAgentHelperNewSkin.SelectByText("TraFile", "Assessment Fee");

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
        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);
        }
Esempio n. 10
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 clientPDFInactive()
        {
            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 PDF template page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/pdf_templates");

            //Verify title
            VerifyTitle("PDF Templates");

            string VerifyInactive = "//table[@id='list1']/tbody/tr[2]/td/a/i[contains(@class,'thumbs-o-up')]";
            string text = "//table[@id='list1']/tbody/tr[2]/td/a[contains(@href,'view')]";

            partnerAgentHelperNewSkin.WaitForText("PDF Template is successfully",20);
            string PdfName = partnerAgentHelperNewSkin.GetText(text);
            if (!partnerAgentHelperNewSkin.IsElementPresent(VerifyInactive))
            {
                partnerAgentHelperNewSkin.ClickElement("ActivatePDF");
                partnerAgentHelperNewSkin.AcceptAlert();
                partnerAgentHelperNewSkin.WaitForWorkAround(5000);

            }

            //Go to client page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients");

            //verify title
               VerifyTitle("Clients");

            //Open client
            partnerAgentHelperNewSkin.ClickElement("ViewClient");

            //verify title
            VerifyTitle(" - Details");

               //click on pdf tab
            partnerAgentHelperNewSkin.ClickElement("ClPdf");

            //verify title
            VerifyTitle(" - Pdfs");

            //verify pdf not available
            partnerAgentHelperNewSkin.VerifyTextNotPresent(PdfName+".pdf");

            //Log out 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 partnerAgentWithUserNewSkin()
        {
            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/agent/create");

            //Verify title
            VerifyTitle("Create a Partner Agent");

            //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.WaitForText("The user is successfully added",30);
        }
Esempio n. 14
0
        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]);
        }