public void VerifyFieldsExist(List<ViewPortalResultsSearchFields> requiredFields) { //input the required fields foreach (var requiredField in requiredFields) { //wait for the fields. To check if the field is visible. //If field is visible, the field exist if (requiredField.Equals(ViewPortalResultsSearchFields.TestNameId)) { TestNameId.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.Subject)) { this.SubjectSelect.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.GradeLevelFrom)) { this.GradeFromSelect.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.GradeLevelTo)) { this.GradeToSelect.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.AdminDateRangeFrom)) { AdminDateRangeFrom.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.AdminDateRangeTo)) { AdminDateRangeTo.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.DataCollectionStatus)) { DataCollectionStatus.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.TestContent)) { TestContent.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.TestCreatorFirstname)) { TestCreatorFirstName.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.TestCreatorLastname)) { TestCreatorLastName.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.StandardSet)) { StandardSet.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.AdaptiveTests)) { AdaptiveTests.Wait(3); } if (requiredField.Equals(ViewPortalResultsSearchFields.TestCategory)) { TestCategory.Wait(3); } } }