Esempio n. 1
0
        public void CreateTask(string TaskCode, string AssetTypeCode, string ShiftCode)
        {
            FpSideMenus SideMenu = new FpSideMenus();

            SideMenu.PlanningBoardClick();
            System.Threading.Thread.Sleep(60000);
            FpPlanningBoardPage PlanningBoard = new FpPlanningBoardPage();

            PropertiesCollection.driver.SwitchTo().Frame(PlanningBoard.Frame);
            PlanningBoard.TabDaily.Click();
            System.Threading.Thread.Sleep(5000);
            PlanningBoard.ExpandTree.Click();
            Actions action = new Actions(PropertiesCollection.driver);

            action.MoveToElement(PlanningBoard.ActivitySelected).ContextClick().Perform();
            System.Threading.Thread.Sleep(5000);

            action.MoveToElement(PlanningBoard.ActivitySelected).MoveByOffset(97, 35).Click().Perform();
            System.Threading.Thread.Sleep(3000);

            PlanningBoard.BtnTaskSelector.Click();
            System.Threading.Thread.Sleep(15000);
            PlanningBoard.TxtTaskCode.SendKeys(TaskCode);
            System.Threading.Thread.Sleep(10000);
            PlanningBoard.TaskSelection.Click();
            System.Threading.Thread.Sleep(5000);
            PlanningBoard.BtnTaskApply.Click();

            PlanningBoard.BtnAssetTypeSelector.Click();
            PlanningBoard.TxtAssetTypeCode.SendKeys(AssetTypeCode);
            System.Threading.Thread.Sleep(5000);
            PlanningBoard.AssetTypeSelection.Click();
            System.Threading.Thread.Sleep(5000);
            PlanningBoard.BtnAssetTypeApply.Click();

            PlanningBoard.BtnShiftSelector.Click();
            PlanningBoard.TxtShiftCode.SendKeys(ShiftCode);
            System.Threading.Thread.Sleep(5000);
            PlanningBoard.ShiftSelection.Click();
            System.Threading.Thread.Sleep(5000);
            PlanningBoard.BtnShiftApply.Click();

            System.Threading.Thread.Sleep(6000);
            PlanningBoard.BtnSave.Click();
            System.Threading.Thread.Sleep(6000);
            PlanningBoard.TabDaily.Click();
            System.Threading.Thread.Sleep(30000);

            PlanningBoard.ExpandTree.Click();
            System.Threading.Thread.Sleep(5000);
        }
Esempio n. 2
0
        public void DeleteActivity(string OrganisationGroup)
        {
            FpSideMenus SideMenu = new FpSideMenus();

            SideMenu.PlanningBoardClick();
            System.Threading.Thread.Sleep(60000);
            FpPlanningBoardPage PlanningBoard = new FpPlanningBoardPage();

            PropertiesCollection.driver.SwitchTo().Frame(PlanningBoard.Frame);
            PlanningBoard.TabDaily.Click();
            System.Threading.Thread.Sleep(10000);
            PlanningBoard.ExpandTree.Click();
            Actions action = new Actions(PropertiesCollection.driver);

            action.MoveToElement(PlanningBoard.ActivitySelected).ContextClick().Perform();
            System.Threading.Thread.Sleep(10000);
            action.MoveToElement(PlanningBoard.ActivitySelected).MoveByOffset(97, 88).Click().Perform();
            System.Threading.Thread.Sleep(3000);
            PlanningBoard.BtnYes.Click();
        }