public void PercentTaughtByThirdLDCSSubject_WhenCorrectValueEntered_ShouldAcceptWithNoValidationErrors() { // Arrange string percentTaughtByThirdLDCSSubject = "50"; // Act Learners_LearnerListObjects learnerTab = WindowObjects.Windows.Main.SelectLearnerTab; learnerTab.ClickAddLearnerButton(); LearningDeliveryObjects learningDeliveryTab = WindowObjects.Windows.Main.SelectLearningDeliveryTab; learningDeliveryTab.ClickAddLearnerButton(); learningDeliveryTab.SelectLearningDeliveryHETab(); learningDeliveryTab.SetPercentTaughtByThirdLDCSSubjectTextBox(percentTaughtByThirdLDCSSubject); // Assert var error = learningDeliveryTab.GetPercentTaughtByThirdLDCSSubjectValidationMessage; TakeScreenShot(); Assert.True(string.IsNullOrEmpty(error), $"Validation failed for invalid Percent taught by second LDCS subject {percentTaughtByThirdLDCSSubject}"); }