/// <summary> /// Adds a snapshot to the test or log with title /// </summary> /// <param name="path">Image path</param> /// <param name="title">Image title</param> /// <returns>A <see cref="ExtentTest"/> object</returns> public ExtentTest AddScreenCaptureFromPath(string path, string title = null) { ScreenCapture sc = new ScreenCapture(); sc.Path = path; sc.Title = title; _test.ScreenCaptureContext().Add(sc); if (_test.ObjectId != null) { int seq = _test.ScreenCaptureContext().Count; sc.TestObjectId = _test.ObjectId; } _extent.AddScreenCapture(_test, sc); return(this); }