public void TypeOfInstanceYear_WhenCorrectSelectionIsMade_ShouldAcceptWithNoValidationErrors() { // Arrange string typeOfInstanceYear = "1 - Year of instance contained within the reporting period 01 August to 31 July"; // Act Learners_LearnerListObjects learnerTab = WindowObjects.Windows.Main.SelectLearnerTab; learnerTab.ClickAddLearnerButton(); LearningDeliveryObjects learningDeliveryTab = WindowObjects.Windows.Main.SelectLearningDeliveryTab; learningDeliveryTab.ClickAddLearnerButton(); learningDeliveryTab.SelectLearningDeliveryHETab(); learningDeliveryTab.SetTypeOfInstanceYearComboBox(typeOfInstanceYear); // Assert var error = learningDeliveryTab.GetTypeOfInstanceYearValidationMessage; TakeScreenShot(); Assert.True(string.IsNullOrEmpty(error), $"Validation failed for invalid Type of instance year {typeOfInstanceYear}"); }