Example #1
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 #2
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();
        }