Пример #1
0
        public void userCountPage()
        {
            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 User page
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/users");

            //Verify title
            VerifyTitle("selOffice's Users");

            //Verify user count page is available
            partnerAgentHelperNewSkin.verifyElementPresent("UserSelectCount");

            //Change count
            int result = partnerAgentHelperNewSkin.changeCount("10");

            //Verify user count
            partnerAgentHelperNewSkin.verifyCount(10,result);

            //Change count
            result = partnerAgentHelperNewSkin.changeCount("20");

            //Verify user count
            partnerAgentHelperNewSkin.verifyCount(20,result);

            //Log out from the application
            GetWebDriver().Navigate().GoToUrl(log[0]);
        }