C# 如何将ScreenCaptureJob链接到浏览器窗口?
我正在尝试使用microsoft expression encoder SDK录制屏幕视频。 但它也会记录锁定窗口的屏幕(超时或Win+L后)。 如何将captureJob绑定到chrome/firefox浏览器并仅捕获浏览器窗口C# 如何将ScreenCaptureJob链接到浏览器窗口?,c#,selenium,screen-capture,expression-encoder,microsoft-expression,C#,Selenium,Screen Capture,Expression Encoder,Microsoft Expression,我正在尝试使用microsoft expression encoder SDK录制屏幕视频。 但它也会记录锁定窗口的屏幕(超时或Win+L后)。 如何将captureJob绑定到chrome/firefox浏览器并仅捕获浏览器窗口 using Microsoft.Expression.Encoder.ScreenCapture; [Binding] public sealed class CommonWebActions { [BeforeScenario] public st
using Microsoft.Expression.Encoder.ScreenCapture;
[Binding]
public sealed class CommonWebActions
{
[BeforeScenario]
public static void Initialize(TestContext testContext)
{
Driver = new ChromeDriver();
Driver.Manage().Window.Maximize();
if (VideoRecorder.Status != RecordStatus.Running)
{
TestRecordName = "Test.wmv";
VideoRecorder.OutputScreenCaptureFileName = TestRecordName;
VideoRecorder.Start();
}
}
[AfterScenario]
public static void CleanUp()
{
VideoRecorder.Stop();
if (_testContext.CurrentTestOutcome == UnitTestOutcome.Passed ||
_testContext.CurrentTestOutcome == UnitTestOutcome.Inconclusive)
{
File.Delete(TestRecordName);
}
Driver.Quit();
}
}