Exemplo n.º 1
0
        public static void Screenshot(string relative)
        {
            var shot = ThreadLocal.Value.Driver.TakeScreenshot();
            var path = GetThreadLocalContext().Output + @"\" + relative;

            shot.SaveAsFile(path, ImageFormat.Png);

            var url   = "unknown";
            var title = "unknown";

            try
            {
                url   = WebContext.WebDriver.Url;
                title = WebContext.WebDriver.Title;
            }
            catch (Exception)
            {
                // ignore;
            }
            TestResultReporter.Log(new ScreenshotLog(title, url, relative));
        }
Exemplo n.º 2
0
 public static void Log(Log log)
 {
     TestResultReporter.Log(log);
 }