Esempio n. 1
0
        public void FillInEmploymentDetailsAndClickNext()
        {
            EmployerShortName.Click();
            PopUpEmployerSearch EmpPop = new PopUpEmployerSearch(driver);

            EmpPop.SearchEmployer();

            // Click on Offering drop down
            var ele = driver.FindElement(By.XPath(".//*[@id='ddmEmployerOfferingID_trMain']/td[2]/img"));
            IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;

            executor.ExecuteScript("var ele=arguments[0];setTimeout(function(){ele.click();},100)", ele);

            // Selects Offering value
            var ele1 = driver.FindElement(By.XPath(".//*[@id='divMenuddmEmployerOfferingID']/table/tbody/tr[2]/td[1]"));
            IJavaScriptExecutor executor1 = (IJavaScriptExecutor)driver;

            executor.ExecuteScript("var ele1=arguments[0];setTimeout(function(){ele1.click();},100)", ele1);

            // Select Setup Reason
            SelectElement drop = new SelectElement(SetupReason);

            drop.SelectByText(ExcelOperation.GetData[3]);

            GenericHelper.AllScreenShot(driver);

            // Click on Next button
            var nextButton = driver.FindElement(By.XPath(".//*[@id='wucButtons_cmdNextEnabled']"));
            IJavaScriptExecutor executor12 = (IJavaScriptExecutor)driver;

            executor12.ExecuteScript("var nextButton=arguments[0];setTimeout(function(){nextButton.click();},100)", nextButton);
        }
        public void FillPayrollDetails()
        {
            string payrollId = GenericHelper.RandomPayRollNo();

            ExcelOperation.AddData("TestData4", payrollId, "TC4_AddingThePackageToTheEmployee");
            PayRollID.SendKeys(payrollId);

            var eleImg = driver.FindElement(By.XPath(".//*[@id='ddmPayCycleID_trMain']/td[2]/img"));
            IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;

            executor.ExecuteScript("var eleImg=arguments[0];setTimeout(function(){eleImg.click();},100)", eleImg);

            // Selects first item fromn Pay Cycle Description drop down
            var eleDropDown = driver.FindElement(By.XPath(".//*[@id='divMenuddmPayCycleID']/table/tbody/tr[2]/td[1]"));
            IJavaScriptExecutor executor1 = (IJavaScriptExecutor)driver;

            executor1.ExecuteScript("var eleDropDown=arguments[0];setTimeout(function(){eleDropDown.click();},100)", eleDropDown);
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);
            Thread.Sleep(2000);

            //Click on the AddButton
            var eleAddButton = driver.FindElement(By.XPath(".//*[@id='wucButtons_cmdAddEnabled']"));
            IJavaScriptExecutor executorAddButton = (IJavaScriptExecutor)driver;

            executorAddButton.ExecuteScript("var eleAddButton=arguments[0];setTimeout(function(){eleAddButton.click();},100)", eleAddButton);
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);
            Thread.Sleep(2000);

            // Clicks on Save button
            GenericHelper.AllScreenShot(driver);
            var eleSaveButton = driver.FindElement(By.Id("wucButtons_cmdSaveEnabled"));
            IJavaScriptExecutor executorSaveButton = (IJavaScriptExecutor)driver;

            executorSaveButton.ExecuteScript("var eleSaveButton=arguments[0];setTimeout(function(){eleSaveButton.click();},100)", eleSaveButton);
        }
Esempio n. 3
0
        public void fillAddress()
        {
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            Addressline1.Clear();
            Addressline1.SendKeys(ExcelOperation.GetData[9]);

            SuburbText.Clear();
            AddressLine2.Clear();
            AddressLine2.SendKeys(ExcelOperation.GetData[10]);
            SuburbText.SendKeys(ExcelOperation.GetData[11]);

            State.Click();
            PostCode.Clear();
            PostCode.SendKeys(ExcelOperation.GetData[12]);
            PostalAddressLine1.Clear();

            PostalAddressLine1.SendKeys(ExcelOperation.GetData[13]);
            PostalAddressLine2.Clear();
            PostalAddressLine2.SendKeys(ExcelOperation.GetData[14]);
            PostalSuburbText.Clear();
            PostalSuburbText.SendKeys(ExcelOperation.GetData[15]);

            PostalStateCombo.Click();
            PostalPostCode.Clear();
            PostalPostCode.SendKeys(ExcelOperation.GetData[16]);
            GenericHelper.AllScreenShot(driver);
            Nextbutton.Click();
        }
Esempio n. 4
0
        public void FillPackageAdminDetails()
        {
            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(5));

            wait.Until(ExpectedConditions.ElementExists(By.XPath(".//*[@id='wucButtons_cmdNextEnabled']")));
            Thread.Sleep(5000);

            GenericHelper.AllScreenShot(driver);
            var ele = driver.FindElement(By.XPath(".//*[@id='wucButtons_cmdNextEnabled']"));
            IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;

            executor.ExecuteScript("var ele=arguments[0];setTimeout(function(){ele.click();},100)", ele);
        }
Esempio n. 5
0
        public void FillDetails()
        {
            TitleCombo.Click();
            GivenName.Clear();
            GivenName.SendKeys(ExcelOperation.GetData[19]);

            Surname.Clear();
            Surname.SendKeys(ExcelOperation.GetData[20]);
            RelationshipText.Clear();

            RelationshipText.SendKeys(ExcelOperation.GetData[21]);
            PasswordText.Clear();
            PasswordText.SendKeys(ExcelOperation.GetData[22]);
            PasswordPromptText.Clear();

            PasswordPromptText.SendKeys(ExcelOperation.GetData[23]);
            GenericHelper.AllScreenShot(driver);
        }
        public void FillReimbursementDetails()
        {
            EffectiveDate.Clear();

            // Select Current business date from screen
            var text_input = driver.FindElement(By.XPath(".//*[@id='Form1']/table/tbody/tr[1]/td/table/tbody/tr[1]/td[2]/font")).Text;
            var result = text_input.Substring(text_input.Length - 11);
            string currentDate = result.Remove(result.Length - 1);

            ExcelOperation.AddData("TestData17", currentDate, "TC1_CreateAnEmployee");
            EffectiveDate.SendKeys(currentDate);

            PreferedMethodToContact.Click();
            ChequeAddress.Click();
            EFTRemittanceCommunicationDetailsMethod.Click();
            IQueueNumberText.Clear();

            IQueueNumberText.SendKeys(ExcelOperation.GetData[18]);
            GenericHelper.AllScreenShot(driver);
            NextButton.Click();            
        }
Esempio n. 7
0
        public void FillPersonalDetails()
        {
            SelectElement oSelect = new SelectElement(driver.FindElement(By.Id("TitleCombo")));

            oSelect.SelectByText(ExcelOperation.GetData[1]);
            GivenName.Clear();

            string GivenNameString = GenericHelper.RandomString(5);

            ExcelOperation.AddData("TestData2", GivenNameString, "TC1_CreateAnEmployee");
            GivenName.SendKeys(GivenNameString);
            OtherName.Clear();

            OtherName.SendKeys(ExcelOperation.GetData[3]);
            Surname.Clear();
            Surname.SendKeys(ExcelOperation.GetData[4]);
            PreferenceName.Clear();

            PreferenceName.SendKeys(ExcelOperation.GetData[5]);
            DateOfBirth.Clear();
            DateOfBirth.SendKeys(ExcelOperation.GetData[6]);
            Gender.Click();

            MobNumber.Clear();
            // MobNumber.SendKeys(ExcelOperation.GetData[7]);
            MobNumber.SendKeys("9999 999999");
            EmailID.Clear();
            EmailID.SendKeys(ExcelOperation.GetData[8]);

            PerferedMethodToContact.Click();
            GenericHelper.AllScreenShot(driver);
            var ele = driver.FindElement(By.Id("CommandButtons_cmdNextEnabled"));
            IJavaScriptExecutor executor = (IJavaScriptExecutor)driver;

            executor.ExecuteScript("var ele=arguments[0];setTimeout(function(){ele.click();},100)", ele);
        }