Exemplo n.º 1
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");
        }