public void Domicile_WhenCorrectValueEntered_ShouldAcceptWithNoValidationErrors() { // Arrange string domicile = "AB"; // Act Learners_LearnerListObjects learnerTab = WindowObjects.Windows.Main.SelectLearnerTab; learnerTab.ClickAddLearnerButton(); LearningDeliveryObjects learningDeliveryTab = WindowObjects.Windows.Main.SelectLearningDeliveryTab; learningDeliveryTab.ClickAddLearnerButton(); learningDeliveryTab.SelectLearningDeliveryHETab(); learningDeliveryTab.SetDomicileTextBox(domicile); // Assert var error = learningDeliveryTab.GetDomicileValidationMessage; TakeScreenShot(); Assert.True(string.IsNullOrEmpty(error), $"Validation failed for invalid Domicile {domicile}"); }