コード例 #1
0
        public void createLanguage()
        {
            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 createLanguageHelper = new CreateLanguageHelper(GetWebDriver());

            //Variable
            var mail = "Test" + RandomNumber(1, 99) + "@yopmail.com";
            var numb = "12345678" + RandomNumber(10, 99);

            //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.");

            //Redirect To Language
            createLanguageHelper.redirectToPage();

            //Verify title
            VerifyTitle("Languages");

            //Click On Create Btn
            createLanguageHelper.ClickElement("ClickOnCreateBtn");

            //Enter Language Name
            var lang = "AA_Lang" + RandomNumber(99,999);
            createLanguageHelper.WaitForWorkAround(5000);
            createLanguageHelper.TypeText("EnterName", lang);

            //Clcik on Master Data
            createLanguageHelper.ClickElement("ClickSave");

            //Clcik on Edit language
            createLanguageHelper.ClickElement("ClickOnEditLanguage");

            //Enter Language Name
            var Elang = "AAA" + RandomNumber(1,99);
            createLanguageHelper.TypeText("EnterLanguage", Elang);

            //ClickOn Edit Save Button
            createLanguageHelper.ClickElement("ClickOnSaveBtn");

            //Click On Del Lang
            createLanguageHelper.ClickElement("ClickOnDelLang");
        }
コード例 #2
0
        public void createLanguageCorp()
        {
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            //Initializing the objects
            var loginAsCorpHelper = new LoginAsCorpHelper(GetWebDriver());
            var clientHelper = new ClientsHelper(GetWebDriver());
            var createLanguageHelper = new CreateLanguageHelper(GetWebDriver());

            //Variable
            var mail = "Test" + RandomNumber(1, 99) + "@yopmail.com";
            var numb = "12345678" + RandomNumber(10, 99);

               //Login with valid credential  Username
            loginAsCorpHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid credential password
            loginAsCorpHelper.TypeText("EnterPassword", "seWelcome2");

            //Click On Login Button
            loginAsCorpHelper.ClickElement("ClickOnLoginButton");
            loginAsCorpHelper.WaitForWorkAround(3000);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Clcik on Master Data
            createLanguageHelper.ClickElement("ClickOnMasterTabCorp");

            //Redirect To Language
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/languages");
             //   createLanguageHelper.ClickElement("LanguagesCorp");

            //Click On Create Btn
            createLanguageHelper.ClickElement("CreateNewLang");

            //Enter Language Name
            var lang = "Test" + RandomNumber(99,999);
            createLanguageHelper.TypeText("CorpLanguage", lang);

            //Clcik on Master Data
            createLanguageHelper.ClickElement("SaveLang");
            createLanguageHelper.WaitForWorkAround(2000);

            //Verify Text
            createLanguageHelper.VerifyPageText("Language Created Successfully");
            createLanguageHelper.WaitForWorkAround(2000);
        }
コード例 #3
0
        public void languagePushToOffice()
        {
            var oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            //Initializing the objects
            var loginAsCorpHelper = new LoginAsCorpHelper(GetWebDriver());
            var createProcessorHelper = new CreateProcessorHelper(GetWebDriver());
            var createLanguageHelper = new CreateLanguageHelper(GetWebDriver());

            //Variable
            var mail = "Test" + RandomNumber(1, 99) + "@yopmail.com";
            var numb = "12345678" + RandomNumber(10, 99);

               //Login with valid credential  Username
            loginAsCorpHelper.TypeText("EnterUsername", "selcorp");

            //Login with valid credential password
            loginAsCorpHelper.TypeText("EnterPassword", "seWelcome2");

            //Click On Login Button
            loginAsCorpHelper.ClickElement("ClickOnLoginButton");
            loginAsCorpHelper.WaitForWorkAround(3000);

            //Verify Page title
            VerifyTitle("Dashboard");
            Console.WriteLine("Redirected at Dashboard screen.");

            //Clcik on Master Data
            createLanguageHelper.ClickElement("ClickOnMasterTabCorp");

            //Redirect To Language
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/languages");
             //   createLanguageHelper.ClickElement("LanguagesCorp");

            //Click On Create Btn
            createLanguageHelper.ClickElement("CreateNewLang");

            //Enter Language Name
            var lang = "PUSH TO OFFICE" + RandomNumber(99,999);
            createLanguageHelper.TypeText("CorpLanguage", lang);

            //Clcik on Master Data
            createLanguageHelper.ClickElement("SaveLang");
            createLanguageHelper.WaitForWorkAround(2000);

            //Verify Text
            createLanguageHelper.VerifyPageText("Language Created Successfully");
            createLanguageHelper.WaitForWorkAround(2000);

            //Click on Push To Office
            createLanguageHelper.ClickElement("PushToOfficeLang");

            //Click ok To Confirm
            createLanguageHelper.AcceptAlert();
            createLanguageHelper.WaitForWorkAround(2000);

            //Verify Confirmation Languges Successfully Pushed to Offices.
            createLanguageHelper.VerifyPageText("Languges Successfully Pushed to Offices.");
            createLanguageHelper.WaitForWorkAround(2000);

            // Logout button
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/logout");

             //################### OFFICE SIDE

            //Login with valid credential  Username
            createProcessorHelper.TypeText("EnterUsernameOff", "AslamKhan");

            //Login with valid credential password
            createProcessorHelper.TypeText("EnterPasswordOff", "1qaz!QAZ");

            //Click On Login Button
            createProcessorHelper.ClickElement("ClickOnLoginButtojn");

            //Mover HoverWelcome
            createProcessorHelper.MouseHover("WelcomeMoveHover");

            // Click ON Admin
            createProcessorHelper.ClickElement("ClickOnAdmin");
            createProcessorHelper.WaitForWorkAround(4000);

            //Click On Mater
            createProcessorHelper.ClickElement("ClickOnMaterOff");

            //Redirect to Procesosr
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/languages");

            //Search pushed language
            createLanguageHelper.TypeText("SearchLanguageOffice", lang);
            createLanguageHelper.WaitForWorkAround(5000);

            //Verify
            createLanguageHelper.VerifyPageText(lang);
            createLanguageHelper.WaitForWorkAround(2000);
        }