示例#1
0
        public void ClientDetails()
        {
            /*Client details*/
            //Thread.Sleep(3000);
            //SwitchTo is Seleniums InBuilt Code and Driver is WebDriver
            SetMethods.SwitchtoAnotherWindow("Child");

            SetMethods.ImplicitlyWait(10);
            SetMethods.PageLoadTimeout(20);
            Thread.Sleep(5000);

            DropDownArrow1.Clicks();
            Thread.Sleep(500);
            ClientDetail1.Clicks();
            Thread.Sleep(500);
            DropDownArrow2.Clicks();
            Thread.Sleep(500);
            ClientDetail2.Clicks();
            Thread.Sleep(500);
            DropDownArrow3.Clicks();
            Thread.Sleep(500);
            ClientDetail3.Clicks();
            Thread.Sleep(500);
            DropDownArrow4.Clicks();
            Thread.Sleep(1000);
            ClientDetail4.Clicks();
            Thread.Sleep(500);
            Find.Clicks();

            /*DropDownArrow1.Click();
             * Thread.Sleep(500);
             * ClientDetail1.Click();
             * Thread.Sleep(500);
             * DropDownArrow2.Click();
             * Thread.Sleep(500);
             * ClientDetail2.Click();
             * Thread.Sleep(500);
             * DropDownArrow3.Click();
             * Thread.Sleep(500);
             * ClientDetail3.Click();
             * Thread.Sleep(500);
             * DropDownArrow4.Click();
             * Thread.Sleep(1000);
             * ClientDetail4.Click();
             * Thread.Sleep(500);
             * Find.Click();*/

            //Look at the output for i-Frames count
            SetMethods.HowmanyIFrames();

            Configuration.PropertiesCollection.driver.SwitchTo().Frame(1);
            Thread.Sleep(500);
            JHT.Clicks();
            Thread.Sleep(500);
            OK.Clicks();

            //Switch back to your parent frame
            Configuration.PropertiesCollection.driver.SwitchTo().DefaultContent();
            //PropertiesCollection.driver.SwitchTo().ParentFrame();
        }
示例#2
0
        public void ClaimDetails()
        {
            SetMethods.ImplicitlyWait(10);
            JTTitle.EnterText("ABCDEFGHIJKLMNOP");
            JobTitleDes.EnterText("Test Automation Engineer");
            Qualification.EnterText("ISTQB");
            DateAppointed.EnterText("03-06-2019");
            OutSide.Clicks();
            Salary.EnterText("123456");
            //SalaryLevelArrow.Clicks();
            SalaryLevelvalue.EnterText("5");
            OutSide.Clicks();

            /*//Look at the output for i-Frames count
             * SetMethods.HowmanyIFrames();
             *
             * PropertiesCollection.driver.SwitchTo().Frame(0);*/
            //SalaryLevelvalue.Clicks();

            /*//Switch back to your parent frame
             * PropertiesCollection.driver.SwitchTo().DefaultContent();
             * //PropertiesCollection.driver.SwitchTo().ParentFrame();*/

            UniqueCaseNo.EnterText("AB015OH03");
            CaseType.EnterText("Short Period");
            OutSide.Clicks();
            CaseOrigin.EnterText("New");
            OutSide.Clicks();
            LeaveCycle.EnterText("2019-2021");
            OutSide.Clicks();
            IncidentStartDate.EnterText("11-03-2020");
            OutSide.Clicks();
            IncidentEndDate.EnterText("15-03-2020");
            OutSide.Clicks();

            //Scrolling down the page
            SetMethods.ScrollById("DD22D8EF4EF14AA1ACC97772D3D130D7-bodyEl");

            EmployeeSignedDate.EnterText("16-03-2020");
            MedCertificateBrowse.Clicks();
            Thread.Sleep(1500);

            //AutoIT
            SetMethods.AutoITUpload("Open", "C:\\Users\\TailorJ\\Downloads\\Fake ID.pdf");
            Thread.Sleep(1000);
            MedCertificateUpload.Clicks();
            Thread.Sleep(1000);

            //Alert handeling - enter either Accept or Cancel
            SetMethods.Alert("Accept");

            Thread.Sleep(15000);
            /*SetMethods.WaitAlertState(60, true);*/

            //Alert handeling - enter either Accept or Cancel
            /*SetMethods.Alert("Accept");*/

            //Need to write a method for Action class in SetMethods
            Actions builder = new Actions(Configuration.PropertiesCollection.driver);

            builder.SendKeys(Keys.Enter);

            Disclaimer.Clicks();
            Status.EnterText("Save as Draft");
            Update.Clicks();
            Thread.Sleep(1000);
            SetMethods.SwitchtoAnotherWindow("Parent");
            //SetMethods.SwitchtoParentWindow();
            Thread.Sleep(1000);
            Search.Clicks();
            Start.Clicks();
            Thread.Sleep(2000);
            Search_Refresh.Clicks();
            SetMethods.ScrollById("frmHMSTILsubmissionListing-lblFormCode");
        }