コード例 #1
0
        public void omahaAuthGridPushToOffice()
        {
            XMLParse oXMLData = new XMLParse();
            oXMLData.LoadXML("../../Config/ApplicationSettings.xml");

            //Initializing the objects
            var loginAsCorpHelper = new LoginAsCorpHelper(GetWebDriver());
            var createProcessorHelper = new CreateProcessorHelper(GetWebDriver());
            var createOmahaAuthGripCorpHelper = new CreateOmahaAuthGripCorpHelper(GetWebDriver());

            //Variable
            String name = "3" + RandomNumber(1, 99);
            String code = "1" + RandomNumber(1,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.");

            //################################# MASTER DATA #############################################

            //Click on MASTER DATA
            createOmahaAuthGripCorpHelper.ClickElement("ClickOnMasterDataTab");

            //##################  Redirect To Url

            //Redirect To URL
            createOmahaAuthGripCorpHelper.RedirectToPage();

            //################################# Create Product tab #############################################

            // Click On Create
            createOmahaAuthGripCorpHelper.ClickElement("ClickOnCreate");

            //Enter Grid Id
            createOmahaAuthGripCorpHelper.TypeText("GridId", name);

            //Enter Visa Pos Authfees
            createOmahaAuthGripCorpHelper.TypeText("VisaPosAuthfees", code);

            //Enter MC Pos Auth Fees
            createOmahaAuthGripCorpHelper.TypeText("MCPosAuthFees", name);

            //Enter Amex Pos AuthFees
            createOmahaAuthGripCorpHelper.TypeText("AmexPosAuthFees", name);

            //Enter Disc Pos Auth Fees
            createOmahaAuthGripCorpHelper.TypeText("DiscPosAuthFees", code);

            //Enter JCD Pos Auth Fees
            createOmahaAuthGripCorpHelper.TypeText("JCDPosAuthFees", name);

            //Enter Voice Auth Fees
            createOmahaAuthGripCorpHelper.TypeText("VoiceAuthFees", code);

            //Enter AVS Electronic Fees
            createOmahaAuthGripCorpHelper.TypeText("AVSElectronicFees", name);

            //Enter AVS Voice Fees
            createOmahaAuthGripCorpHelper.TypeText("AVSVoiveFees", code);

            //Enter AVS Voive Fees
            createOmahaAuthGripCorpHelper.TypeText("ARUFees", name);

              //  Click on Save button
            createOmahaAuthGripCorpHelper.ClickElement("SaveBtn");
            createOmahaAuthGripCorpHelper.WaitForWorkAround(3000);

            //Verify Page Text
            createOmahaAuthGripCorpHelper.VerifyPageText("Corporate Master Omaha Auth Grid Created Successfully.");
            createOmahaAuthGripCorpHelper.WaitForWorkAround(3000);

            //Push To Office
            createOmahaAuthGripCorpHelper.ClickElement("PushToOffice");

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

            //Verify Confirmation Languges Successfully Pushed to Offices.
            createOmahaAuthGripCorpHelper.VerifyPageText("Omaha Auth Grids successfully pushed to offices.");
            createOmahaAuthGripCorpHelper.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/omaha_auth_grids");

            //Search GripIdSrch
            createOmahaAuthGripCorpHelper.TypeText("GripIdSrch", name);
            createOmahaAuthGripCorpHelper.WaitForWorkAround(3000);

            //Verify
            createOmahaAuthGripCorpHelper.VerifyPageText(name);
            createOmahaAuthGripCorpHelper.WaitForWorkAround(2000);
        }
コード例 #2
0
        public void createOmahaAuthGrid()
        {
            //    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
            LoginAsCorpHelper loginAsCorpHelper = new LoginAsCorpHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            CreateOmahaAuthGripCorpHelper createOmahaAuthGripCorpHelper = new CreateOmahaAuthGripCorpHelper(GetWebDriver());

            //Variable
            String name = "3" + RandomNumber(1, 99);
            String code = "1" + RandomNumber(1,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.");

            //Click on Clients in Topmenu
            //            clientHelper.clickClients();

            //Click to open client info
               //         clientHelper.OpenClient();

            //################################# MASTER DATA #############################################

            //Click on MASTER DATA
            createOmahaAuthGripCorpHelper.ClickElement("ClickOnMasterDataTab");

            //##################  Redirect To Url

            //Redirect To URL
            createOmahaAuthGripCorpHelper.RedirectToPage();

            //################################# Create Product tab #############################################

            // Click On Create
            createOmahaAuthGripCorpHelper.ClickElement("ClickOnCreate");

            //Enter Grid Id
            createOmahaAuthGripCorpHelper.TypeText("GridId", name);

            //Enter Visa Pos Authfees
            createOmahaAuthGripCorpHelper.TypeText("VisaPosAuthfees", code);

            //Enter MC Pos Auth Fees
            createOmahaAuthGripCorpHelper.TypeText("MCPosAuthFees", name);

            //Enter Amex Pos AuthFees
            createOmahaAuthGripCorpHelper.TypeText("AmexPosAuthFees", name);

            //Enter Disc Pos Auth Fees
            createOmahaAuthGripCorpHelper.TypeText("DiscPosAuthFees", code);

            //Enter JCD Pos Auth Fees
            createOmahaAuthGripCorpHelper.TypeText("JCDPosAuthFees", name);

            //Enter Voice Auth Fees
            createOmahaAuthGripCorpHelper.TypeText("VoiceAuthFees", code);

            //Enter AVS Electronic Fees
            createOmahaAuthGripCorpHelper.TypeText("AVSElectronicFees", name);

            //Enter AVS Voice Fees
            createOmahaAuthGripCorpHelper.TypeText("AVSVoiveFees", code);

            //Enter AVS Voive Fees
            createOmahaAuthGripCorpHelper.TypeText("ARUFees", name);

              //  Click on Save button
            createOmahaAuthGripCorpHelper.ClickElement("SaveBtn");
            createOmahaAuthGripCorpHelper.WaitForWorkAround(3000);

            //Verify Page Text
            createOmahaAuthGripCorpHelper.VerifyPageText("Corporate Master Omaha Auth Grid Created Successfully.");
            createOmahaAuthGripCorpHelper.WaitForWorkAround(3000);
        }