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

            //Verify Title
            VerifyTitle("Section Management");

            //Click on Change tab button
            partnerAgentHelperNewSkin.ClickElement("FSChangeTab");

            //Verify error not displayed
            partnerAgentHelperNewSkin.VerifyTextNotPresent("An Internal Error Has Occurred");

            //Click on Save button
            partnerAgentHelperNewSkin.ClickElement("FSSave");

            //Accept alert
            partnerAgentHelperNewSkin.AcceptAlert();

            //Verify error not displayed
            partnerAgentHelperNewSkin.VerifyTextNotPresent("An Internal Error Has Occurred");

            //Verify page text
            partnerAgentHelperNewSkin.VerifyPageText("The section sucessfully added to the selected tab");

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
Exemplo n.º 2
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]);
        }
Exemplo n.º 3
0
        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");
        }
Exemplo n.º 4
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");
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
        public void copyrightNotAvail()
        {
            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 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.VerifyTextNotPresent("Copyright @");

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }
Exemplo n.º 7
0
        public void verifyRecycleBin()
        {
            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 Client export page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/clients/export");

            //Verify Title
            VerifyTitle("Client");

            //Mouse hover on the Ticks
            partnerAgentHelperNewSkin.MouseHover("TicHover");

            //Verify 'RecycleBin' not available
            partnerAgentHelperNewSkin.VerifyTextNotPresent("RecycleBin");

            //Verify Recycle Bin available
            partnerAgentHelperNewSkin.VerifyPageText("Recycle Bin");
        }
Exemplo n.º 8
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]);
        }
Exemplo n.º 9
0
        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]);
        }