public void When_CaptureScreen_is_called_Then_takes_screenshot_of_correct_format(string path, ImageFormat format, string expected) { File.Delete(path); _session.CaptureScreen(path); var actual = GetMimeFromFile(path); actual.Should().Be(expected); File.Delete(path); }