public void Before() { var currentMethod = String.Format("{0}.png", MethodBase.GetCurrentMethod().GetFullName()); var defaultSettings = new Settings(); path = Path.Combine(defaultSettings.ScreenCapturePath, currentMethod); File.Delete(path); session = new Session<InternetExplorer>(); session.NavigateTo<CheckboxPage>(GetUrl("Checkbox.html")); _returnSession = session.CaptureScreen(); }
public void When_loading_with_generic_driver_and_custom_settings_Then_should_return_session_with_custom_settings() { var customSettings = new Settings { ScreenCapturePath = @"C:\Temp" }; Threaded<Session> .With<PhantomJS>(customSettings) .VerifyThat(x => x.Settings.Should().Be(customSettings)) .End(); }
public void Before() { var currentMethod = CallStack.GetCurrentMethod().GetFullName(); const string path = @"C:\Temp"; _filePath = Path.ChangeExtension(Path.Combine(path, currentMethod), "png"); File.Delete(_filePath); var settings = new Settings { ScreenCapturePath = path }; _session = new Session<InternetExplorer>(settings); _session.NavigateTo<CheckboxPage>(GetUrl("Checkbox.html")); _returnSession = _session.CaptureScreen(_filePath); }
public void When_default_constructor_is_used_Then_current_directory_is_used() { var settings = new Settings(); settings.ScreenCapturePath.Should().Be(Environment.CurrentDirectory); }