Пример #1
0
        private void UpdateSuiteExecutionTime()
        {
            string[] flags  = { ExtentFlag.GetPlaceHolder("suiteStartTime"), ExtentFlag.GetPlaceHolder("suiteEndTime") };
            string[] values = { runInfo.StartedTime.ToString(), runInfo.EndedTime.ToString() };

            lock (sourcelock)
            {
                extentSource = SourceBuilder.BuildRegex(extentSource, flags, values);
            }
        }
Пример #2
0
        private void UpdateMediaList()
        {
            string mediaSource = MediaViewBuilder.GetSource(mediaList.ScreenCapture, "img");

            string[] flags  = new string[] { ExtentFlag.GetPlaceHolder("imagesView") };
            string[] values = new string[] { mediaSource + ExtentFlag.GetPlaceHolder("imagesView") };

            if (!(infoWrite >= 1 && values[0].IndexOf("No media") >= 0))
            {
                lock (sourcelock)
                {
                    extentSource = SourceBuilder.BuildRegex(extentSource, flags, values);

                    if (mediaList.ScreenCapture.Count > 0)
                    {
                        try
                        {
                            string match = RegexMatcher.GetNthMatch(extentSource, ExtentFlag.GetPlaceHolder("objectViewNullImg") + ".*" + ExtentFlag.GetPlaceHolder("objectViewNullImg"), 0);
                            extentSource = extentSource.Replace(match, "");
                        }
                        catch { }
                    }

                    mediaList.ScreenCapture.Clear();
                }
            }

            mediaSource = MediaViewBuilder.GetSource(mediaList.Screencast, "vid");
            flags       = new string[] { ExtentFlag.GetPlaceHolder("videosView") };
            values      = new string[] { mediaSource + ExtentFlag.GetPlaceHolder("videosView") };

            if (!(infoWrite >= 1 && values[0].IndexOf("No media") >= 0))
            {
                lock (sourcelock)
                {
                    extentSource = SourceBuilder.BuildRegex(extentSource, flags, values);

                    if (mediaList.Screencast.Count > 0)
                    {
                        try
                        {
                            string match = RegexMatcher.GetNthMatch(extentSource, ExtentFlag.GetPlaceHolder("objectViewNullVid") + ".*" + ExtentFlag.GetPlaceHolder("objectViewNullVid"), 0);
                            extentSource = extentSource.Replace(match, "");
                        }
                        catch { }
                    }

                    mediaList.Screencast.Clear();
                }
            }

            infoWrite++;
        }
Пример #3
0
        private void UpdateSystemInfo(Dictionary <string, string> SystemInfo)
        {
            if (extentSource.IndexOf(ExtentFlag.GetPlaceHolder("systemInfoApplied")) > 0)
            {
                return;
            }

            if (SystemInfo.Count > 0)
            {
                string   systemSource = SourceBuilder.GetSource(SystemInfo) + ExtentFlag.GetPlaceHolder("systemInfoApplied");
                string[] flags        = new string[] { ExtentFlag.GetPlaceHolder("systemInfoView") };
                string[] values       = new string[] { systemSource + ExtentFlag.GetPlaceHolder("systemInfoView") };

                lock (sourcelock)
                {
                    extentSource = SourceBuilder.BuildRegex(extentSource, flags, values);
                }
            }
        }