Exemplo n.º 1
0
        private void StartSelenium()
        {
            List <BrowserType> typesToStart = new List <BrowserType>();

            foreach (Models.Version version in Studio.CurrentProject.Versions)
            {
                if (!typesToStart.Contains(GetBrowserType(version.Settings.GetMultipleChoiceSetting("BrowserType"))))
                {
                    typesToStart.Add(GetBrowserType(version.Settings.GetMultipleChoiceSetting("BrowserType")));
                }
            }
            foreach (BrowserType type in typesToStart)
            {
                (bool debugModeOn, SettingsCollection browserSettings)settings = GetDebugSettings(Studio.CurrentProject.Settings.GetSubSettings("debugSettings"), type);
                StartSeleniumTask task = new StartSeleniumTask(type, settings.browserSettings);
                task.Id        = "start" + GetBrowserTypeString(type);
                task.Executed += SeleniumStarted;
                Studio.ScheduleBackgroundTask(task);
            }
        }
Exemplo n.º 2
0
        private void SeleniumStarted(object sender, AsyncTasks.EventArgs.AsyncTaskEventArgs eventArgs)
        {
            StartSeleniumTask task = eventArgs.Task as StartSeleniumTask;

            Selenium.Add(task.Type, task.Selenium);
        }