public void Test009_Search(string folderName, string pattern, int results) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'SEARCH:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SearchForFile(pattern); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the results"); Assert.That(adminFileManagementPage.FindElements(By.XPath(FileManagementPage.FileViewItems + "[contains(@style, 'visibility: visible;')]")).Count, Is.EqualTo(results), "The number of results is not correct"); }