Example #1
0
 public static void Hoover(IWebElement hoveron, IWebElement elementtoclick)
 {
     BasePage.driver.SwitchTo().DefaultContent();
     Hoover(hoveron);
     CustomMehtods.WaitAndClick(elementtoclick);
     BasePage.driver.SwitchTo().Frame("f1");
 }
Example #2
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);
        }
Example #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();
        }
Example #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();
        }
Example #5
0
 public void CreateNewEmp()
 {
     _employeenew.Click();
     CustomMehtods.EnterText(_employeeID, RandomGen.RandomG());
     CustomMehtods.EnterText(_employeeFN, RandomGen.RandomG());
     CustomMehtods.EnterText(_employeeLN, RandomGen.RandomG());
     _RateTab.Click();
     CustomMehtods.EnterText(_employeeBR, RandomGen.RandomG());
     CustomMehtods.EnterText(_employeeCR, RandomGen.RandomG());
     _employeeSave.Click();
 }
Example #6
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();
        }
Example #7
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();
        }
Example #8
0
        //static void Main(string[] args)
        public static void BillingCycle()
        {
            CustomMehtods.NewWebdriverAndGoToUrl();

            Pages.login.LogIn();

            CustomMehtods.Hoover(Pages.listmenu._List, Pages.employee._employee);
            Pages.employee.CreateNewEmp();
            //////string EID = empl._employeeID.GetAttribute("Value");  Get the Emp ID property value to pass that on to cleint and project.


            CustomMehtods.Hoover(Pages.listmenu._List, Pages.client._Client);
            Pages.client.CreateNewClient();
            //////// Cli.CreateNewClient(EID);          Fucntion call to Create a client with Emp ID passed for cleint manager
            ////////string CLID = Cli._ClientID.GetAttribute("value");



            CustomMehtods.Hoover(Pages.listmenu._List, Pages.project._ProjectTab);
            Pages.project.CreateNewProject();
            ////Pro.CreateNewProject(CLID, EID);    Get the Client ID property value to pass that on to Project.


            CustomMehtods.Hoover(Pages.listmenu._Time, Pages.timeentry._TimeEntryTab);
            Pages.timeentry.CreateNewTimeEntry();


            CustomMehtods.Hoover(Pages.listmenu._Expense, Pages.expenseLog._ExpenseLogTab);
            Pages.expenseLog.CreateNewExpenseEntry();


            CustomMehtods.Hoover(Pages.listmenu._Billing, Pages.billingreview.BRTab);
            Pages.billingreview.CreateNewInvoice();


            BasePage.driver.Quit();
        }