예제 #1
0
        public void CreateNewExpenseEntry()
        {
            _ELNew.Click();
            _ELEmpDD.Click();

            CustomMehtods.WaitAndClick(_ELEmp);
            _ELDateField.Click();
            _ELDateSel.Click();

            _ELProjectDD.Click();
            CustomMehtods.WaitAndClick(_ELProject);

            _ELExpDD.Click();
            CustomMehtods.WaitAndClick(_ELExp);

            _ELUnits.SendKeys("10");
            Thread.Sleep(5000);
            _ELCost.Clear();


            _ELCost.SendKeys("22");

            _ELMore.Click();
            _ELApproveChkbx.Click();

            CustomMehtods.WaitAndClick(_TESave);
        }
예제 #2
0
 public static void Hoover(IWebElement hoveron, IWebElement elementtoclick)
 {
     BasePage.driver.SwitchTo().DefaultContent();
     Hoover(hoveron);
     CustomMehtods.WaitAndClick(elementtoclick);
     BasePage.driver.SwitchTo().Frame("f1");
 }
예제 #3
0
        public void CreateNewTimeEntry()
        {
            _TENew.Click();

            _TEEmpDD.Click();
            CustomMehtods.WaitAndClick(_TEEmp);

            _TEDateField.Click();
            _TEDateSel.Click();

            _TEProjectDD.Click();
            CustomMehtods.WaitAndClick(_TEProject);

            _TEActDD.Click();
            CustomMehtods.WaitAndClick(_TEAct);

            _TEAHours.SendKeys("10");

            if (!_TEBillable.Selected)
            {
                _TEBillable.Click();
            }


            _TEMore.Click();

            CustomMehtods.WaitAndClick(_TEApproveChkbx);

            CustomMehtods.WaitAndClick(_TESave);

            IAlert alert = BasePage.driver.SwitchTo().Alert();     //Hanldes the Browser alert

            alert.Accept();
        }
예제 #4
0
        public void CreateNewInvoice()
        {
            SelectElement ViewBy = new SelectElement(BRViewBy);

            ViewBy.SelectByIndex(1);
            BRProjectFDD.Click();
            CustomMehtods.WaitAndClick(BRProjectSelect);

            BRProjectTDD.Click();
            CustomMehtods.WaitAndClick(BRProjectSelectSecond);

            //Thread.Sleep(500);
            SelectElement Period = new SelectElement(BRAsOf);

            Period.SelectByValue("All");

            BRRefresh.Click();
            Thread.Sleep(1501);
            var CW = BasePage.driver.CurrentWindowHandle;

            foreach (string window in BasePage.driver.WindowHandles)
            {
                BasePage.driver.SwitchTo().Window(window);
                BasePage.driver.FindElement(By.Id("conformationFalseButton")).Click();
            }
            Thread.Sleep(1001);
            BasePage.driver.SwitchTo().Window(CW);
            BasePage.driver.SwitchTo().Frame("f1");
            Thread.Sleep(550);
            BRDetailsOption.Click();
            BRWUDWindowClick.Click();
            Thread.Sleep(900);
            foreach (string window in BasePage.driver.WindowHandles)
            {
                BasePage.driver.SwitchTo().Window(window);
            }

            BRSelectAllToApplyWUD.Click();
            BREnterWUD.SendKeys("50");
            BRWUDUpdate.Click();
            BRCloseWUDWindow.Click();
            Thread.Sleep(1001);
            BasePage.driver.SwitchTo().Window(CW);
            BasePage.driver.SwitchTo().Frame("f1");
            Thread.Sleep(1000);
            CustomMehtods.Clicks(BRBillChkBox);
            // BasePage.driver.SwitchTo().Window(CW);
            // BasePage.driver.SwitchTo().Frame("f1");
            // Thread.Sleep(1000);
            CustomMehtods.Hoover(BRClickOnProcess);
            // SetMethod_Ext.Clicks(BRClickOnProcess);
            Thread.Sleep(1500);
            //WebDriverWait wait = new WebDriverWait(BasePage.driver, TimeSpan.FromSeconds(11));
            //wait.Until(ExpectedConditions.ElementToBeClickable(By.Id("lnkProcessOption")));
            // SetMethod_Ext.Clicks(BRClickOnProcess);
            // SetMethod_Ext.Clicks(BRClickOnProcess);
            // Thread.Sleep(10000);
            BRProcessAsFinal.Click();
        }
예제 #5
0
        public void CreateNewClient()

        {
            CustomMehtods.Clicks(_ClientNew);
            CustomMehtods.EnterText(_ClientID, RandomGen.RandomG());

            _ClientMgrDD.Click();
            CustomMehtods.WaitAndClick(_ClientManagerRow);

            IAlert alert = BasePage.driver.SwitchTo().Alert();     //Hanldes the Browser alert

            alert.Accept();

            _ClientSave.Click();
        }
예제 #6
0
        public void CreateNewProject()
        {
            _ProjectNew.Click();
            CustomMehtods.EnterText(_ProjectCode, RandomGen.RandomG());
            CustomMehtods.EnterText(_ProjectName, RandomGen.RandomG());

            _ProjectClientDD.Click();
            CustomMehtods.WaitAndClick(_ProjectClient);

            _ProjectManagerDD.Click();
            CustomMehtods.WaitAndClick(_ProjectManager);

            SelectElement Manager = new SelectElement(_ProjectContractType);

            Manager.SelectByText("Fixed");

            _ProjectContractAmt.Click();
            _ProjectContractAmt.SendKeys("1000");
            _ProjectSave.Click();
        }