Ejemplo n.º 1
0
        public static void CaseCUnplannedTask()
        {
            CaseCActivities   activit  = new CaseCActivities();
            CareServiceOrders activity = new CareServiceOrders();

            Thread.Sleep(2000);
            activit.CaseCUnplanned.Click();
            Thread.Sleep(1000);
            activit.StartAndEnd.Click();
            Thread.Sleep(1000);
            activit.TopSubscriber.Click();
            Thread.Sleep(1000);
            activit.KeyCustomer.Click();
            Thread.Sleep(1000);
            WorkOrder = Driver.driver.FindElement(By.CssSelector("#avista-global-container > div > div.container"));
            if (WorkOrder.Text.Trim() == "Sorry. Activities not found")
            {
                Console.WriteLine("Sorry. Activities not found!");
                //activit.Activities.Click();
                //Thread.Sleep(1000);
            }
            else
            {
                activit.Activities.Click();
                Thread.Sleep(1000);
                Console.WriteLine(WorkOrder.Text.Trim() + "\n");
            }

            Thread.Sleep(1000);
            activit.BackButton.Click();
            Thread.Sleep(1000);
            activity.LogoutButton.Click();
            Thread.Sleep(1000);
            activity.Logout.Click();
        }
Ejemplo n.º 2
0
        public static void CaseBSettingsAttendance(string SecretKey)
        {
            CaseBMobileAttendance setting = new CaseBMobileAttendance();
            CareServiceOrders     attnd   = new CareServiceOrders();

            Thread.Sleep(1000);
            setting.CaseBAttend.Click();
            Thread.Sleep(1000);
            setting.AttendanceSettings.Click();
            Thread.Sleep(1000);
            setting.SendPassword.SendKeys(SecretKey);
            Thread.Sleep(1000);
            setting.KeyOkButton.Click();
            for (int i = 1; i < 5; i++)
            {
                WorkOrder = Driver.driver.FindElement(By.CssSelector("#avista-global-container > div > div.container > div.main-content > div > div:nth-child(1) > div:nth-child(2) > div:nth-child(" + i + ") > label"));
                WorkOrder.Click();
            }
            setting.Presence.Click();
            Thread.Sleep(1000);
            IList <IWebElement> subelements = setting.AttendanceContainer.FindElements(By.ClassName("user-item"));

            Thread.Sleep(1000);
            Console.WriteLine("Number of orders found for AService user: "******"user-item")).Count);
            Thread.Sleep(1000);
            //Assert.AreEqual(subelements.Count, 21);
            //Thread.Sleep(1000);
            setting.BackButton.Click();
            Thread.Sleep(1000);
            attnd.LogoutButton.Click();
            Thread.Sleep(1000);
            attnd.Logout.Click();
        }
Ejemplo n.º 3
0
        public static void CaseCareUnpalnnedContract()
        {
            CaseCActivities   contract = new CaseCActivities();
            CareServiceOrders contact  = new CareServiceOrders();

            Thread.Sleep(2000);
            contract.CaseCUnplanContractIndicator.Click();
            Thread.Sleep(1000);
            contract.CarinaSubscriber.Click();
            Thread.Sleep(1000);
            contract.Care.Click();
            Thread.Sleep(2000);
            contract.CaseCUnplanContractIndicator.Click();
            Thread.Sleep(1000);
            contract.EndButton.Click();
            Thread.Sleep(1000);
            WorkOrder = Driver.driver.FindElement(By.CssSelector("#avista-global-container > div > div.container"));
            Console.WriteLine(WorkOrder.Text.Trim());
            Thread.Sleep(1000);
            contract.SaveButton.Click();
            Thread.Sleep(1000);
            contact.LogoutButton.Click();
            Thread.Sleep(1000);
            contact.Logout.Click();
        }
Ejemplo n.º 4
0
        public static void CaseCSecondDeliveryWorkOrder()
        {
            CaseCActivities   order    = new CaseCActivities();
            CareServiceOrders contacts = new CareServiceOrders();

            Thread.Sleep(1000);
            order.CMyWorkOrderTasks.Click();
            Thread.Sleep(1000);
            order.SecondDelivery.Click();
            Thread.Sleep(1000);
            order.StartandEndCheckBox.Click();
            Thread.Sleep(1000);
            order.StartDeliveryButton.Click();
            Thread.Sleep(1000);
            WorkOrder = Driver.driver.FindElement(By.CssSelector("#avista-global-container > div > div.container"));
            Console.WriteLine(WorkOrder.Text.Trim());
            Thread.Sleep(1000);
            order.BackToDeliveries.Click();
            Thread.Sleep(1000);
            order.BackToList.Click();
            Thread.Sleep(1000);
            order.BackMenu.Click();
            Thread.Sleep(1000);
            contacts.LogoutButton.Click();
            Thread.Sleep(1000);
            contacts.Logout.Click();
        }
Ejemplo n.º 5
0
        public static void CaseENextDayMyWorkOrdertasks()
        {
            CaseDTempChanges  temp     = new CaseDTempChanges();
            CareServiceOrders contacts = new CareServiceOrders();

            Thread.Sleep(1000);
            temp.Nextday.Click();
            Thread.Sleep(2000);
            WorkOrder = Driver.driver.FindElement(By.CssSelector("#avista-global-container > div > div > div.order-list-container"));
            Console.WriteLine(WorkOrder.Text.Trim());
            Thread.Sleep(1000);
            temp.BackButton.Click();
            Thread.Sleep(1000);
            contacts.LogoutButton.Click();
            Thread.Sleep(1000);
            contacts.Logout.Click();
        }
Ejemplo n.º 6
0
        public static void CaseBDchandeMyworkOrder()
        {
            CaseBMobileAttendance change      = new CaseBMobileAttendance();
            CareServiceOrders     ChangeOrder = new CareServiceOrders();

            Thread.Sleep(1000);
            change.ChangeTodaysWorkOrder.Click();
            Thread.Sleep(1000);
            WorkOrder = Driver.driver.FindElement(By.ClassName("delivery_count"));
            string NumberofOrders = WorkOrder.Text.Trim();

            Console.WriteLine(NumberofOrders);
            change.ChangeBackButton.Click();
            Thread.Sleep(1000);
            ChangeOrder.LogoutButton.Click();
            Thread.Sleep(1000);
            ChangeOrder.Logout.Click();
        }
Ejemplo n.º 7
0
        public static void SelectServiceTasks()   //Service is assigned to scheme row nut has no orders. So, ChangeMYOrderTasks is not testing for this account
        {
            CareServiceOrders CareService = new CareServiceOrders();

            Thread.Sleep(3000);
            CareService.AService.Click();
            Thread.Sleep(3000);
            CareService.MyWorkOrderTask.Click();
            Thread.Sleep(3000);
            IList <IWebElement> subelements = CareService.WholePage.FindElements(By.ClassName("order-item"));

            Console.WriteLine("Number of orders found for AService user: "******"order-item")).Count);
            Assert.AreEqual(subelements.Count, 2);
            CareService.BackButton.Click();
            Thread.Sleep(1000);
            CareService.LogoutButton.Click();
            Thread.Sleep(1000);
            CareService.Logout.Click();
        }
Ejemplo n.º 8
0
        public static void CaseBWorkshift()
        {
            CaseBMobileAttendance workshift = new CaseBMobileAttendance();
            CareServiceOrders     work      = new CareServiceOrders();

            Thread.Sleep(2000);
            workshift.CaseBWorkShift.Click();
            IList <IWebElement> subelements = workshift.WorkshiftContainer.FindElements(By.ClassName("user-item-content"));

            Thread.Sleep(2000);
            Console.WriteLine("Number of attendies for user : "******"user-item-content")).Count);
            Thread.Sleep(2000);
            // Assert.AreEqual(subelements.Count, 1);
            Thread.Sleep(2000);
            workshift.BackButton.Click();
            Thread.Sleep(2000);
            work.LogoutButton.Click();
            Thread.Sleep(2000);
            work.Logout.Click();
        }
Ejemplo n.º 9
0
        public static void CaseBMobilAttendance()
        {
            CaseBMobileAttendance attend        = new CaseBMobileAttendance();
            CareServiceOrders     attendservice = new CareServiceOrders();

            Thread.Sleep(1000);
            attend.CaseBAttend.Click();
            Thread.Sleep(1000);
            IList <IWebElement> subelements = attend.AttendanceContainer.FindElements(By.ClassName("user-item"));

            Thread.Sleep(1000);
            Console.WriteLine("Number of orders found for AService user: "******"user-item")).Count);
            Thread.Sleep(1000);
            //Assert.AreEqual(subelements.Count, 21);
            //Thread.Sleep(1000);
            attend.BackButton.Click();
            Thread.Sleep(1000);
            attendservice.LogoutButton.Click();
            Thread.Sleep(1000);
            attendservice.Logout.Click();
        }
Ejemplo n.º 10
0
        public static void CaseBCOrderDeliveries()
        {
            CaseBMobileAttendance order    = new CaseBMobileAttendance();
            CareServiceOrders     delivery = new CareServiceOrders();

            Thread.Sleep(1000);
            order.CaseBWorkOrderDeliveries.Click();
            Thread.Sleep(1000);
            IList <IWebElement> subelements = order.OrderDeliveryContainer.FindElements(By.ClassName("order-item"));

            Thread.Sleep(1000);

            for (int option = 1; option < subelements.Count + 1; option++)
            {
                WorkOrder = Driver.driver.FindElement(By.CssSelector("  #avista-global-container > div > div > div.order-list-container > div.order-group-list1 > div:nth-child(" + option + ")"));
                Console.WriteLine(WorkOrder.Text.Trim() + "\n");
            }
            Thread.Sleep(1000);
            Console.WriteLine("Number of attendies for user : "******"order-item")).Count + "\n");
            Thread.Sleep(1000);
            order.NextdayButton.Click();
            IList <IWebElement> subelements1 = order.OrderDeliveryContainer.FindElements(By.ClassName("order-item"));

            Thread.Sleep(1000);

            for (int option = 1; option < subelements.Count + 1; option++)
            {
                WorkOrderNextDay = Driver.driver.FindElement(By.CssSelector("  #avista-global-container > div > div > div.order-list-container > div.order-group-list1 > div:nth-child(" + option + ")"));
                Console.WriteLine(WorkOrderNextDay.Text.Trim() + "\n");
            }

            Thread.Sleep(1000);
            Console.WriteLine("Number of attendies for user : "******"order-item")).Count + "\n");
            Thread.Sleep(1000);
            order.Back.Click();
            Thread.Sleep(1000);
            delivery.LogoutButton.Click();
            Thread.Sleep(1000);
            delivery.Logout.Click();
        }