public IEnumerable <JSTest> RunTests(string jsFilePath, BrowserSetUp browserSetUp) { var filesBeingTested = new List <string> { "*.htm", "*.html" }.SelectMany( filter => Directory.EnumerateFiles(jsFilePath, filter, SearchOption.AllDirectories)); foreach (string fileBeingTested in filesBeingTested) { string url = fileBeingTested; var actions = UITestRunner.InitializeWorkFlowContainer( b => b.ElementsOfType <ListItem>() .Where(x => x.InnerHtml.StartsWith("<strong>")) .ForEach(x => GetJSTestSummary(x, url))); var list = new List <Action <Browser> > { (b => b.GoTo(url)), (b => b.WaitForComplete()), }; if (actions != null) { list.AddRange(actions); } var notification = new TestRunner(new BrowserProvider(browserSetUp), browserSetUp).PassesTest(list) ?? new Notification(); Assert.True(notification.Success, notification.ToString()); } return(_jSTests); }