private void RunTests(List <string> testInputs, AutomationBrowserType browserType, string outputDirectory, int degreeOfParallelism = 5)
        {
            ParallelOptions option = new ParallelOptions()
            {
                MaxDegreeOfParallelism = browserType != AutomationBrowserType.MobileChromeBrowser ? degreeOfParallelism : 1
            };

            Parallel.ForEach(testInputs, option, (input) =>
            {
                var info = AutomationUtility.Deserialize <MovieInfo>($"{outputDirectory}\\{AutomationUtility.ExcludeSymbols(input)}.xml");
                if (info != null)
                {
                    var automationDriver = new AutomationDriver();
                    automationDriver.StartBrowser(browserType, 3);
                    AutomationFacade facade = new AutomationFacade(automationDriver.Browser, 120);

                    try
                    {
                        info = facade.Run(info, outputDirectory, browserType);

                        if (string.IsNullOrEmpty(info.Directors_Wiki))
                        {
                            info.Directors_Wiki = "Cannot find Wikipedia result";
                        }

                        if (string.IsNullOrEmpty(info.Directors_Imdb))
                        {
                            info.Directors_Imdb = "Cannot find IMDb result";
                        }

                        Console.WriteLine($"The test {info.Passed} for {info.Name}");
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                        info                = new MovieInfo();
                        info.Name           = input;
                        info.Directors_Imdb = "Cannot find IMDb result";
                        info.Directors_Wiki = "Cannot find Wikipedia result";
                    }

                    AutomationUtility.Serialize <MovieInfo>(info, $"{outputDirectory}\\{AutomationUtility.ExcludeSymbols(info.Name)}.xml");
                    automationDriver.StopBrowser();
                }
            });
        }
        private List <List <string> > GetReportData(List <string> testInputs, string outputDirectory)
        {
            var header = new List <string> {
                "Name", "WikiLink", "Wiki_Directors", "Wiki_Screenshot", "ImdbLink", "Imdb_Directors", "Wiki_Screenshot", "Result"
            };
            var reportData = new List <List <string> >();

            reportData.Add(header);

            testInputs.ForEach(input => {
                var info = AutomationUtility.Deserialize <MovieInfo>($"{outputDirectory}\\{AutomationUtility.ExcludeSymbols(input)}.xml");
                if (info != null)
                {
                    reportData.Add(info.ToArray().ToList());
                }
            });

            return(reportData);
        }