public void CheckMechanicBusinessAbsencePageValidations()
        {
            CustomLib.Highlightelement(saveMechanicBusinessAbsenceBtn);
            saveMechanicBusinessAbsenceBtn.Click();
            CustomWait.FluentWaitbyXPath("StartDateValidation");
            string StartDateValidationText = StartDateValidation.Text;

            Assert.AreEqual("Start date is required", StartDateValidationText);
            Console.WriteLine("Start Date Error is :" + StartDateValidationText);

            CustomWait.FluentWaitbyXPath("EndDateValidation");
            string EndDateValidationText = EndDateValidation.Text;

            Assert.AreEqual("End date is required", EndDateValidationText);
            Console.WriteLine("End Date Error is :" + EndDateValidationText);

            CustomWait.FluentWaitbyXPath("DescriptionValidation");
            string DescriptionValidationText = DescriptionValidation.Text;

            Assert.AreEqual("Description is Required", DescriptionValidationText);
            Console.WriteLine("Description error text is :" + DescriptionValidationText);

            CustomWait.FluentWaitbyXPath("CancelMechanicBusinessAbsencePage");
            ((IJavaScriptExecutor)Drive.driver).ExecuteScript("window.scrollBy(0,200)");
            CustomLib.Highlightelement(CancelMechanicBusinessAbsencePage);
            CancelMechanicBusinessAbsencePage.Click();
        }
 public void clickintoActionBtn()
 {
     CustomWait.FluentWaitbyXPath("EditButton");
     CustomLib.Highlightelement(EditButton);
     EditButton.Click();
     CustomWait.WaitFortheLoadingIconDisappear2000();
 }
Example #3
0
 public void ClickonLanguage()
 {
     CustomWait.WaitFortheLoadingIconDisappear5000();
     Drive.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
     CustomWait.FluentWaitbyXPath("engLanguage");
     CustomLib.Highlightelement(EngLanguage);
     EngLanguage.Clicks();
 }
Example #4
0
 public void EnterPassword(string password)
 {
     CustomLib.Highlightelement(TxtPassword);
     CustomWait.FluentWaitbyXPath("txtPassword");
     TxtPassword.SendKeys(password);//Enter Password
     CustomLib.Highlightelement(SignIn);
     //Click on LoginBtn
     CustomWait.FluentWaitbyXPath("signIn");
     SignIn.Clicks();
 }
Example #5
0
 public GetPropertiesObjects StaySignedIN()
 {
     CustomLib.Highlightelement(StaySignedIn);
     CustomWait.FluentWaitbyXPath("staySignedIn");
     StaySignedIn.Clicks();
     CustomLib.Highlightelement(Yes);
     CustomWait.FluentWaitbyXPath("yes");
     Yes.Clicks();
     //Return to the GetProperties
     return(new GetPropertiesObjects());
 }
Example #6
0
 public void EnterUserName(string userName)
 {
     Drive.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
     //Enter UserName
     CustomLib.Highlightelement(TxtUserName);
     CustomWait.FluentWaitbyXPath("txtUserName");
     TxtUserName.SendKeys(userName);
     //Click on LoginBtn
     CustomLib.Highlightelement(SubmitBtn);
     CustomWait.FluentWaitbyXPath("submitBtn");
     SubmitBtn.Clicks();
 }
        /// <summary>
        /// Navigate to Mechanics
        /// :Click on DARS Tab>> Click on Mechanics Tab in Workshop setting
        /// </summary>

        public void ClickonDARS()
        {
            Drive.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            CustomWait.FluentWaitbyXPath("engLanguage");
            CustomLib.Highlightelement(engLanguage);
            engLanguage.Clicks();
            //Click on DARS Tab
            CustomLib.Highlightelement(DARSHighlight);
            CustomWait.FluentWaitbyXPath("clickonDARS");
            clickonDARS.Click();
            CustomWait.FluentWaitbyXPath("clickonMechanicsTab");
            CustomLib.Highlightelement(clickonMechanicsTab);
            clickonMechanicsTab.Click();
        }
        public void CheckMechanicLeavePageValidations()
        {
            CustomLib.Highlightelement(saveMechanicLeaveBtn);
            saveMechanicLeaveBtn.Click();
            CustomWait.FluentWaitbyXPath("StartDateError");
            string StartDateErrorText = StartDateError.Text;

            Assert.AreEqual("Start date is required", StartDateErrorText);
            Console.WriteLine("Start Date Error is :" + StartDateErrorText);
            CustomWait.FluentWaitbyXPath("EndDateError");
            string EndDateErrorText = EndDateError.Text;

            Assert.AreEqual("End date is required", EndDateErrorText);
            Console.WriteLine("End Date Error is :" + EndDateErrorText);
            CustomWait.FluentWaitbyXPath("CancelMechanicLeavePage");
            CustomLib.Highlightelement(CancelMechanicLeavePage);
            CancelMechanicLeavePage.Click();
        }
 public void ExitFromMechanicDetailsPage()
 {
     CustomLib.Highlightelement(ExitFromMechanicAdditionalDetailsPage);
     CustomWait.WaitFortheLoadingIconDisappear2000();
     Hardwareworking.Hover(ExitFromMechanicAdditionalDetailsPage);
 }