public void bulkUpdateSalesManagerForClient()
        {
            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 clientBugsHelper = new ClientBugsHelper(GetWebDriver());

            //Variable

            var FirstName = "Test" + RandomNumber(1, 99);
            var LastName = "Tester" + RandomNumber(1, 99);
            var Number = "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.");

            //Click on Clients in Topmenu
            clientBugsHelper.ClickElement("ClientTab");
            clientBugsHelper.WaitForElementVisible("ClickOnOppChjkBox",30);

            //Click On Opp Check Box
            clientBugsHelper.ClickElement("ClickOnOppChjkBox");

            //Click On Bulk Update
            clientBugsHelper.ClickElement("ClickOnBulkUpdate");

            //Change Sale Manager
            clientBugsHelper.ClickElement("ChangeSaleManager");

            //Select Sales MANAGER
            clientBugsHelper.SelectDropDownByText("//*[@id='ClientSalesManagerUpdateSalesManagerId']", "Aslam Khan");

            //Click on Update button
            clientBugsHelper.ClickDisplayed("//button[text()='Update']");
            clientBugsHelper.AcceptAlert();
            clientBugsHelper.WaitForWorkAround(2000);
            clientBugsHelper.VerifyPageText("records updated successfully");
        }
        public void editTicketForClient()
        {
            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
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            var clientBugsHelper = new ClientBugsHelper(GetWebDriver());

            //Variable
            var TicketName = "Test" + RandomNumber(9, 999);
            var NewName = "TestNew Ticket" + 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.");
            clientBugsHelper.WaitForWorkAround(4000);

            //Click On Client Tab
            clientBugsHelper.ClickElement("ClientTab");
            clientBugsHelper.WaitForWorkAround(4000);

            //Clcik on Clinet
            clientBugsHelper.ClickElement("ClickOnClient");
            clientBugsHelper.WaitForElementPresent("CreateTicketBtn", 40);

            //scroll to element
            clientBugsHelper.scrollToElement("CreateTicketBtn");
            //Create Ticket Btn
            clientBugsHelper.ClickElement("CreateTicketBtn");
            clientBugsHelper.WaitForElementPresent("EnterTicketName",40);

            //Enter Ticket Name
            clientBugsHelper.TypeText("EnterTicketName", TicketName);

            //Enter Description
            clientBugsHelper.TypeText("TicketDescription","Testing Ticket Description");

            //Click on Select
            clientBugsHelper.Select("SelectStatustICKET", "Open");

            //Click on Select
            clientBugsHelper.SelectDropDownByText("//*[@id='TicketAssignedUserId']", "Aslam Khan");

            //Click on Select
            clientBugsHelper.SelectDropDownByText("//*[@id='TicketAssignedManagerId']", "Aslam Khan");

            //Clcik Save ticket button
            clientBugsHelper.ClickDisplayed("//input[@value='Save']");
            clientBugsHelper.WaitForWorkAround(2000);

            //Click on Loc
            clientBugsHelper.VerifyPageText("1 Ticket(s) created");

            clientBugsHelper.VerifyPageText(TicketName);
            clientBugsHelper.WaitForWorkAround(2000);

            //Click on Ticket Tab
             //   clientBugsHelper.ClickElement("TicketTab");
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/ticket-search/open");

            //Search Ticket
            clientBugsHelper.TypeText("TaskSearch", TicketName);
            clientBugsHelper.WaitForWorkAround(3000);

            //Click On Ticket
            clientBugsHelper.ClickElement("ClickOnEditTicket");
            clientBugsHelper.WaitForWorkAround(3000);

            //Enter Ticket Name
            clientBugsHelper.TypeText("EnterTicketName", TicketName);

            //Click on Save
            clientBugsHelper.ClickElement("ClickOnSaveButn");
            clientBugsHelper.VerifyPageText("Ticket Edited Successfully");
            clientBugsHelper.WaitForWorkAround(3000);
        }
        public void inactivePickListStatuses()
        {
            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 clientBugsHelper = new ClientBugsHelper(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.");

               //Redirect To URL
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/admin");

            //Click on System Tab
             //       clientBugsHelper.ClickElement("ClickOnSystemTab");

            //Redirect To PickList
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/pick-lists");

            //Enter Name To Seacrch
            clientBugsHelper.TypeText("EnterNamePicklist", "Statuses");

            //Enter Name To Seacrch
            clientBugsHelper.TypeText("EnterModule", "Clients");
            clientBugsHelper.WaitForWorkAround(4000);

            //Click On Statuses
            clientBugsHelper.ClickElement("ClickOnStatuses");
            clientBugsHelper.WaitForElementPresent("ClickOnAddBtn",20);

            //Clcik on Add button
            clientBugsHelper.ClickElement("ClickOnAddBtn");

            //Enter PickList Value
            var name = "Test" + RandomNumber(99, 99000);
            clientBugsHelper.TypeText("EnterPickListValue", name);

            //Click PickList Save Button
            clientBugsHelper.ClickElement("PickListSaveBtn");
            clientBugsHelper.WaitForWorkAround(3000);

            //Refresh
            GetWebDriver().Navigate().Refresh();
            clientBugsHelper.WaitForWorkAround(3000);

            //Click on Inactive button
            clientBugsHelper.PicInactive(name);
            clientBugsHelper.WaitForWorkAround(3000);

            //Replace Picklist
            clientBugsHelper.SelectDropDownByText("//*[@id='PickListValueReplaceItem']", "Declined");
            clientBugsHelper.WaitForWorkAround(3000);

            //PicklistSaveBtnReplace
            clientBugsHelper.ClickElement("PicklistSaveBtnReplace");

            //ACcep Alert
            clientBugsHelper.AcceptAlert();
            clientBugsHelper.WaitForWorkAround(3000);

            //Ver
            //    clientBugsHelper.VerifyStatusInactve(name);
            //    clientBugsHelper.WaitForWorkAround(3000);

            //Verify The picklist value is added successfully
            //clientBugsHelper.VerifyPageText("The picklist value is added successfully");
            clientBugsHelper.WaitForWorkAround(3000);
        }
        public void createTicketAndDeleteTicketFromAgnet()
        {
            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
            LoginHelper loginHelper = new LoginHelper(GetWebDriver());
            ClientsHelper clientHelper = new ClientsHelper(GetWebDriver());
            var clientBugsHelper = new ClientBugsHelper(GetWebDriver());

            //Variable
            var TicketName = "Test" + 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.");
            clientBugsHelper.WaitForWorkAround(4000);

            //Click On Client Tab
            clientBugsHelper.ClickElement("ClientTab");
            clientBugsHelper.WaitForWorkAround(4000);

            //Clcik on Clinet
            clientBugsHelper.ClickElement("ClickOnClient");

            //Create Ticket Btn
            clientBugsHelper.ClickElement("CreateTicketBtn");

            //Enter Ticket Name
            clientBugsHelper.TypeText("EnterTicketName", TicketName);

            //Enter Description
            clientBugsHelper.TypeText("TicketDescription","Testing Ticket Description");

            //Click on Select
            clientBugsHelper.Select("SelectStatustICKET", "Open");

            //Click on Select
            clientBugsHelper.SelectDropDownByText("//*[@id='TicketAssignedUserId']", "Aslam Khan");

            //Click on Select
            clientBugsHelper.Select("//*[@id='TicketAssignedManagerId']", "Aslam Khan");

            //Clcik Save ticket button
            clientBugsHelper.ClickDisplayed("//input[@value='Save']");
            clientBugsHelper.WaitForWorkAround(2000);

            //Click on Loc
            clientBugsHelper.VerifyPageText("1 Ticket(s) created");

            clientBugsHelper.VerifyPageText(TicketName);
            clientBugsHelper.WaitForWorkAround(2000);

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

            //###############   LOGIN AS MY EMPLOYEE AGENT

            //Enter User name
            clientBugsHelper.TypeText("EnterUsername", "MyEmpAgent");

            //Enter Password
            clientBugsHelper.TypeText("EnterPassword", "1qaz!QAZ");

            //Click login button
            clientBugsHelper.ClickElement("LoginBtn");

            //Click on Ticket tab
            clientBugsHelper.ClickElement("TicketTab");
            GetWebDriver().Navigate().GoToUrl("https://www.pegasus-test.com/selenium_corp/selenium_office/tickets");
            clientBugsHelper.WaitForWorkAround(3000);

            //Enter Ticket Subject
            clientBugsHelper.TypeText("TaskSearch", TicketName);
            clientBugsHelper.WaitForWorkAround(3000);

            //Click On Check box
            clientBugsHelper.ClickElement("ClickOnOppChjkBox");

            //Click on Delete
            clientBugsHelper.ClickElement("ClickDeleteIcon");
            clientBugsHelper.AcceptAlert();
            clientBugsHelper.WaitForWorkAround(3000);
            clientBugsHelper.VerifyPageText("Records deleted successfully");
            clientBugsHelper.WaitForWorkAround(2000);
        }
Beispiel #5
0
        public void meetingForLead()
        {
            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 clientBugsHelper = new ClientBugsHelper(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.");

            //Click on Activity Tab
             //        clientBugsHelper.ClickElement("ClickOnActivityTab");

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

            //EnterMeetingName
            clientBugsHelper.TypeText("EnterMeetingName","Test Meeting");

            //MeetingStart
            clientBugsHelper.ClickElement("MeetingStart");
            clientBugsHelper.WaitForWorkAround(3000);

            //ClickDate18
            clientBugsHelper.ClickElement("ClickDate18");
            clientBugsHelper.WaitForWorkAround(3000);

            //EndDATE
            clientBugsHelper.ClickElement("EndDATE");
            clientBugsHelper.WaitForWorkAround(3000);

            //ClickDate28
            clientBugsHelper.ClickElement("ClickDate28");
            clientBugsHelper.WaitForWorkAround(3000);

            //ClickOnSaveButn
            clientBugsHelper.ClickElement("ClickOnSaveButn");
            clientBugsHelper.WaitForWorkAround(3000);

            //Select Related
            clientBugsHelper.SelectDropDownByText("//*[@id='MeetingParentType']", "Lead");

            //ClickOnAssignedToMeeting
            clientBugsHelper.ClickElement("ClickOnAssignedToMeeting");

            //SelectLedForMeeting
            clientBugsHelper.ClickElement("SelectLedForMeeting");
            clientBugsHelper.WaitForWorkAround(3000);

            //ClickOnSaveButn
            clientBugsHelper.ClickElement("ClickOnSaveButn");
            clientBugsHelper.WaitForWorkAround(3000);

            //verify page text
            clientHelper.VerifyPageText("Meeting saved successfully.");
            clientBugsHelper.WaitForWorkAround(3000);
        }