public void clickEditEquipmentAfterConfirmDelete()
        {
            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
            var loginHelper          = new LoginHelper(GetWebDriver());
            var clientHelper         = new ClientsHelper(GetWebDriver());
            var equiomentHelperAdmin = new EquiomentHelperAdmin(GetWebDriver());

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

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

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

//#######################  MOVE HOVER TO THE WELCOME
            //Click on Move over
            equiomentHelperAdmin.ClickElement("MoveHover");

            //Click On  Admin
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/admin");

//################################# Terminal And Equipment Tab #############################################

            //Click on Terminal And Equipment Tab
            equiomentHelperAdmin.ClickElement("ClickOnEquipmentTab");

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

            //Redirect To URL
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/equipment");

//################################# Create Equipments #############################################

            // Click On Create
            equiomentHelperAdmin.ClickElement("ClickOnCreate");
            equiomentHelperAdmin.WaitForWorkAround(3000);

            //Enter Equipment Name
            equiomentHelperAdmin.TypeText("EqpName", "TestEquip");

            //Enter DownloadsIDName
            equiomentHelperAdmin.Select("Type", "Check Reader");

            //Enter Equipment Id
            equiomentHelperAdmin.TypeText("EquipmentId", Id);

            //Enter Category
            //    equiomentHelperAdmin.Select("Category", "68");

            //Enter Version
            equiomentHelperAdmin.TypeText("Version", "Testing");

            //Enter Description
            equiomentHelperAdmin.TypeText("Description", "This is Testing Description");

            //Click On First CheckBox
            //     equiomentHelperAdmin.ClickElement("ClickOnFirstCheckBox");

            //Click On First CheckBox
            //      equiomentHelperAdmin.ClickElement("ClickOn2CheckBox");

            //######################## CLICK ON SAVE BUTTON  ########################################
            // Click on Save button
            equiomentHelperAdmin.ClickElement("SaveBtn");
            equiomentHelperAdmin.WaitForWorkAround(3000);

            //SearchEquipmenmt
            equiomentHelperAdmin.TypeText("SearchEquipmenmt", "TestEquip");
            equiomentHelperAdmin.WaitForWorkAround(3000);

            //Redirect
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/equipment");
            equiomentHelperAdmin.WaitForWorkAround(3000);

            //ClcikDeleteEq
            equiomentHelperAdmin.ClickElement("ClcikDeleteEq");

            //Accpet Alert
            equiomentHelperAdmin.AcceptAlert();

            //equiomentHelperAdmin
            equiomentHelperAdmin.ClickElement("ClickOnEditEquip");
            equiomentHelperAdmin.WaitForWorkAround(3000);
        }
Exemplo n.º 2
0
        public void vendorSocialurlValidate()
        {
            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
            var loginHelper          = new LoginHelper(GetWebDriver());
            var clientHelper         = new ClientsHelper(GetWebDriver());
            var equiomentHelperAdmin = new EquiomentHelperAdmin(GetWebDriver());

            //Variable
            String name = "Test" + RandomNumber(1, 99);
            String Id   = "12345" + RandomNumber(1, 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 URL
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selcorp/seloffice/vendors/create");

            //Verify title
            VerifyTitle("Create a New Vendor");

            //Invalid facebook URL
            equiomentHelperAdmin.TypeText("VenFace", "INVALID");

            //Invalid Linkedln URL
            equiomentHelperAdmin.TypeText("VenLnkl", "INVALID");

            //Invalid Website URL
            equiomentHelperAdmin.TypeText("VenWeb", "INVALID");

            //Invalid Twiter URL
            equiomentHelperAdmin.TypeText("VenTwt", "INVALID");

            // Click on Save button
            equiomentHelperAdmin.ClickElement("AllButtonSave");

            //Verify validation for URL displayed
            equiomentHelperAdmin.verifyElementDisplayed("VenFaceError");
            equiomentHelperAdmin.verifyElementDisplayed("VenTwtError");
            equiomentHelperAdmin.verifyElementDisplayed("VenLnklError");
            equiomentHelperAdmin.verifyElementDisplayed("VenWebError");

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

            //Verify title
            VerifyTitle("Manage Shipping Carrier");

            //Enter Invlalid URL
            equiomentHelperAdmin.TypeText("ShippingTrack", "INVALID");

            // Click on Save button
            equiomentHelperAdmin.ClickElement("AllButtonSave");
        }